![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sed or awk to convert text files with recurring headings to rows and colum | Bjoeboo | Shell Programming and Scripting | 5 | 05-07-2008 10:47 AM |
| how to read the column and print the values under that column | gemini106 | Shell Programming and Scripting | 6 | 03-28-2008 07:05 AM |
| How to check Null values in a file column by column if columns are Not NULLs | Mandab | Shell Programming and Scripting | 7 | 03-15-2008 09:57 AM |
| replace a column values with the first value in column | sumeet | UNIX for Advanced & Expert Users | 3 | 02-06-2007 01:13 PM |
| Replace 10th column with a new column--- Terriblly hurry | ahmedwaseem2000 | Shell Programming and Scripting | 2 | 09-06-2005 01:10 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ls -l column headings
I'm trying to see if there's a way to see column headings when I type the
ls -l command. I know what some of the fields mean for example in the following listing: Code:
total 136 drwxr-xr-x 2 root root 4096 Jun 5 15:16 bin drwxr-xr-x 3 root root 4096 Jul 9 15:25 boot drwxr-xr-x 9 root root 3240 Jul 17 20:08 dev drwxr-xr-x 40 root root 4096 Aug 14 16:51 etc I don't know what the 2nd, 3rd and 4th column mean. man ls , says "-l use a long listing format" but doesn't detail what's listed. I searched everywhere, but couldn't find an answer to this question. I appreciate any information on getting the headings to display. |
|
|||||
|
If you issued the ls -l command it will list out the all files and DIR in the root.
ls -l command will display the below result total 136 drwxr-xr-x 2 root root 4096 Jun 5 15:16 bin drwxr-xr-x 3 root root 4096 Jul 9 15:25 boot drwxr-xr-x 9 root root 3240 Jul 17 20:08 dev drwxr-xr-x 40 root root 4096 Aug 14 16:51 etc 1st column is --> file type(DIR/Files) and access details for UGO (User Group Others). 2nd column is --> position of the file/dir and Name of the Root (2,9) 3rd Column is --> Name of the Root and file located path (root) 4th Column is --> - do-- (i am not sure) 5th Column is Size of the file and Dir (4096 ) 6th Column is (Timestamp)Date and time of file / DIR created. (Aug 14 16:51 7th Column is File Directory name (dev,boot) Let me know if you need any details Regards, Siva.P Bangalore |
|
|||||
|
Hi,
If you want display the second column from the file, we can go for awk command here is the correct command ls- l | awk '{ print $2 }' examaple: ls -l -rw-r--r-- 1 raroc raroc 0 2007-10-23 16:05 tt -rw-r--r-- 1 raroc raroc 22 2008-05-09 21:19 web_orig_20070509 - -rw-r--r-- 1 raroc raroc 23 2008-05-09 21:16 work - correct command for retrieve the second column ls- l | awk '{ print $2 }' O/P is: 1 1 1 Regards, MPS |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|