LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I get ls to print column headings? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-get-ls-to-print-column-headings-910849/)

Belton222 10-29-2011 04:01 PM

How do I get ls to print column headings?
 
I'm writing a script to use output from the ls command, and want column headings to help me - there are so many options in the ls command, with different data being displayed differently that I'm getting confused. Column headings would make it so much easier to understand.

Thanks in advance,
David

catkin 10-29-2011 11:01 PM

There is no ls option to print column headings; perhaps your script could add them. AFAIK there is no complete reference to the meaning of GNU ls columns. The nearest thing to it is this page for a UNIX ls; perhaps you could create a page for GNU ls.

Telengard 10-30-2011 01:13 AM

Quote:

Originally Posted by Belton222 (Post 4511444)
I'm writing a script to use output from the ls command

It's probably not a good idea, especially if you want your script to be portable. Not every implementation of ls works the same. Whatever it is you're trying to do, there is very likely a much better solution.

http://mywiki.wooledge.org/ParsingLs


All times are GMT -5. The time now is 04:07 PM.