On 22/05/10 23:22, Peng Yu wrote:
> ls -go gives me permission and file sizes. But I only want to show
> time and file names. Would you please let me know what command to use?

You could use cut to show the required columns:

  ls -go | tr -s '[:blank:]' ' ' | cut -d' ' -f4-

Note if we supported `cut -d '[:blank:]'` adjacent
spaces in file names would not be squeezed.

You could also use find:

  find . -maxdepth 1 -printf "%Tx %f\n"

There was also talk of adding format directives to ls,
but there were various issues raised with that:

  http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14977

cheers,
Pádraig.



Reply via email to