• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

Extract Columns From la -al

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
xoxomos
Asked:
xoxomos
  • 2
2 Solutions
 
PapertripCommented:
ls -la /tmp/score_provider_delete.lst | awk '{print $6,$7,$8}'

Open in new window

0
 
jackiechen858Commented:
ls -la | awk '{print $6" "$7" "$8}'


0
 
PapertripCommented:
...

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
 
xoxomosAuthor Commented:
So is guess awk it is.
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now