Skip to main content
Video Man Pages

ls – Video Man Page

By April 11, 2013No Comments

I think this video man page on ls will blow you away. I may have drifted into hyperbole there, but when you see the sorting options you will understand my excitement. Ls can list the contents of out directories and I am sure we are familiar with its basic usage. Many training courses however, seem promote the output of ls being piped through to the command sort for sorting. I am sure from that many people have grown up completely unaware of the sort capabilities that make up ls itself. They are as follows:

  • -a : list all files
  • -A : List all but exclude the implied directories . and ..
  • -C : vertical layout
  • -x : horizontal layout
  • -1 : single column
  • -l : long or verbose listing
  • -n : the same but show UID and GID numbers and not the name
  • -lG : display only user name in ownership
  • -lg : display only group name in ownership
  • -F : display file type indicator
  • -X : sort by extension
  • -S : sort by size
  • -t : sort by date
  • -r : reverse sort

This is a powerful command that is overlooked a little too much.