Today’s blog is going to state something obvious, but I would like to emphasize the fascination the power a simple command can give you. I’m talking about ls, the most widely used command on any CLI. Of course, every senior Unix user should be aware of the huge amount of command line options ls sports, but integrating this power into your day to day usage is somewhat harder. Here, from the man page, the complete list of possible options:
ls [-ABCFGHLPRTWZabcdefghiklmnopqrstuwx1] [file ...] The key to mastering all the possible and practical combinations is to arrange them into something easy to memorize. For example, you want to have a detailed listing of all files sorted by time-stamp. The following two lines achieve the same thing, one being somehow easy to memorize (spoken, it sounds like “later”):
ls -latr ls -trla And this is already the whole secret: the easier to speak/spell the options, the easier you remember them! Additionally, if it sounds like a word which gives you a hint of the function, you will learn it in no time.