Linux Tips 5: Getting more out of "ls" directory listing

|
I have previously discussed how to use .bashrc to make re-typing commands a relatively pain free process and now I am sharing some more aliases for .bashrc that makes getting directly listings that you want quick and easy as well.

The commands for .bashrc are:

alias ls="ls -h --color"
alias l="ls -lh --color"
alias la="ls -lah --color"
What the code does is changes the default ls command to show human readable size counts as well as use color coding. The l command, which is what I use the most, provides a basic new ls with the long option so that I can see all file attributes, etc. To see hidden files just type la.

Type man ls to find other options in ls that you find useful and create an alias using it. These are highly personalized commands that can be used over and over and really saves time over the long run. So don't limit yourself to my examples and experiment to find what works for you.

0 comments:

Post a Comment