[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enhancement request: ls option to output column headings

From: Pádraig Brady
Subject: Re: enhancement request: ls option to output column headings
Date: Wed, 22 Mar 2023 16:20:42 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0

On 22/03/2023 12:39, Bob Power via GNU coreutils General Discussion wrote:
Lots of questions online asking what the various columns output by ls are and 
ultimately it seems ls...

does not print headingsdoes not offer an option to print headingsdoes not doc 
what the columns areand
what is output and in what order varies with the software version, options 
used, and possibly distribution.

I've resorted to comparing the output with output from the stat command to 
figure it out.I've even considered replacing it with a bash script along the 
lines of  \ls -1 | xargs -n1 stat --printf='%B*%b %n\n' etc so I can determine 
and output the headings.

It'd be nice if ls had a command line option to output column headings (leave 
the default as is so as not to break existing scripts)
Looks like it hasn't changed in 10 yrs or so. With linux maturing/becoming more 
attractive the way it is and alternatives getting uglier maybe an update is in 

Yes this has some merit,
especially since it's awkward to achieve with `column` due to whitespace in 
names, dates etc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]