2011-10-10

Some very simple examples for Linux command ls

ls is one of the few frequently used commands in my daily life. I decide to show some examples of it so my colleagues can easily pick up.

  • ls -rtl *.ac: Show all *.ac files and their details (-l), sorted by their modification time (-t) in ascending order (-r)
  • ls -rSl *.ac: Show all *.ac files and their details (-l), sorted by their size (-S) in ascending order (-r)

A note for using ls on Mac OS X: Using option -G will give folder and non-folder files different colors.

No comments: