Ubuntu: Nicest Way to List a Folder’s Contents from the Terminal

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)

You might also enjoy:

About Craig Lotter

Craig Lotter is an established web developer and application programmer, with strong creative urges (which keep bursting out at the most inopportune moments) and a seemingly insatiable need to love all things animated. Living in the beautiful coastal town of Gordon's Bay in South Africa, he games, develops, takes in animated fare, trains under the Funakoshi karate style and for the most part, simply enjoys life with his amazing wife and daughter. Oh, and he draws ever now and then too.
This entry was posted in Software & Websites, Tutorials and tagged , , , , . Bookmark the permalink.
  • Munaf

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

blog comments powered by Disqus