Subject: bug#6251: How only show time of files with ls?

From: Pádraig Brady <[email-masked]>
Date: Sun, 23 May 2010 01:08:16 +0100

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.