Ls usage

From raju

indicators

"ls -F" appends indicators */=>@| to filenames.

  • * means executable.
  • / means directory.
  • = means socket.
  • > means door.
  • @ means symbolic link (or that the file has extended attributes).
  • | means named pipe.

Ref:- https://unix.stackexchange.com/questions/82357/what-do-the-symbols-displayed-by-ls-f-mean

only show filename and modification time

    ls -al | cut -d ' ' -f 6- 
    

Another way (using find):

    find -maxdepth 1 -type f -printf "%TY %Tb %Td %TH:%TM\t%p\n"
    

To sort the files based on timestamp (reverse chronological order)

    find -maxdepth 1 -type f -printf "%T+#%TY %Tb %Td %TH:%TM\t%p\n" | sort -rn| cut -d# -f2-
    

The %T+ is used to sort the output properly and gets removed by cut afterwards.

Ref:- https://askubuntu.com/a/1044206/574082