Solved

Extract Columns From la -al

Posted on 2011-09-08
4
345 Views
Last Modified: 2012-05-12
I run ls -la to get:

oracle@bb0:~/scripts$ ls -la /tmp/score_provider_delete.lst
-rw-r--r--   1 oracle   oracle       264 Sep  8 12:45 /tmp/score_provider_delete.lst
What is the easiest way to extract just the Sep 8 12:45?
Must i use awk or is there something more accessable?
0
Comment
Question by:xoxomos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 125 total points
ID: 36506273
ls -la /tmp/score_provider_delete.lst | awk '{print $6,$7,$8}'

Open in new window

0
 
LVL 7

Assisted Solution

by:jackiechen858
jackiechen858 earned 50 total points
ID: 36506352
ls -la | awk '{print $6" "$7" "$8}'


0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36506379
...

Or just do it how I wrote, which is a syntax that is easier on the eyes than all those quotes.  Just use commas as I originally posted.

0
 

Author Closing Comment

by:xoxomos
ID: 36506434
So is guess awk it is.
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Mailserver setup & redundancy 2 123
lunix and unix command 21 154
SSH to Solaris server (which uses NIS) 1 49
How many users could squid support? 21 59
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question