Solved

Extract Columns From la -al

Posted on 2011-09-08
4
349 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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

717 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