The following alias will list just the directories in a directory and not other ordinary files. It will list a directory as a directory even if the directory is a symbolic link.
alias dir='ls -Lla|grep ^d'
Without the capital "L" in this alias, the alias will not list directories that are symbolic links.
For using this alias every time, put this command in your ".profile" file in the Home directory.
Another example, suppose you have to go to some logs directory very frequently, which is say something like this:
/siebel78/siebsrvr1/siebsrvr/enterprises/ABCDE/server1/log
You can make an alias,
alias golog='cd /siebel78/siebsrvr1/siebsrvr/enterprises/ABCDE/server1/log'
and then use this alias from anywhere from the server to go to the Logs directory.
alias dir='ls -Lla|grep ^d'
Without the capital "L" in this alias, the alias will not list directories that are symbolic links.
For using this alias every time, put this command in your ".profile" file in the Home directory.
Another example, suppose you have to go to some logs directory very frequently, which is say something like this:
/siebel78/siebsrvr1/siebsrvr/enterprises/ABCDE/server1/log
You can make an alias,
alias golog='cd /siebel78/siebsrvr1/siebsrvr/enterprises/ABCDE/server1/log'
and then use this alias from anywhere from the server to go to the Logs directory.
No comments:
Post a Comment