Ubuntu: Nicest Way to List a Folder’s Contents from the Terminal CodeUnit 06 AUG 2010

This short little note is intended entirely for my own usage because believe it or not, I am somehow forever forgetting the switches needed to make the bog standard list (ls) function output something that I can easily ready.

ls -l -h -a

There. That will help me in the future I’m sure!

In case you are wondering which switches I have now employed, the -l indicates a long listing, in other words all files and folders are listing one below the other, with a complete set of attribute data next to the file name. The -h forces a human readable print out of the file size variable – in other words 1024 will become 1K. Finally the -a simply forces ls to show us all hidden files and folders.

Truly, I feel like an idiot for even recording this! (shame)

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.

  • Munaf

    don't forget to alias it to “ll” or “l” in your .bashrc — mine is: alias l='ls -laFh'