Solved

Extract Columns From la -al

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error log using ftp 7 56
EXCHANGE. LINUX, SYMANTEC MESSAGING GATEWAY 2 37
Linux Real Time Memory on Distinct 24 Cycle 7 29
Samba 4, Users Permission, 5 45
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

856 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