![]() |
Shell Tips & Tricks
Shell Tips & Tricks
Create A Command Alias Most of us use 'ls -l' so, will it not be easier to have a smaller command to show us long listing, add the following line to ~/.bashrc Code:
alias ll='ls -l'Code:
[root@pradeep ~]# llUse Previous Command's Arguments Running a command with the same arguments used in the previous command, use '!*' to repeat all arguments or '!:2' to use the second argument. '!$' uses the last argument. Let's see a few examples. Code:
[root@pradeep ~]# mkdir -p /tmp/pradeep/test/shellCtrl+U - Cuts everything to the left Ctrl+W - Cuts the word to the left Ctrl+Y - Pastes what's in the buffer Ctrl+A - Go to beginning of line Ctrl+E - Go to end of line Ctrl+R - Search command history Changing File Extensions Code:
rename 's/.html$/.html.bak/' *.htmlRun a second command only if the first one is successfull Code:
cd /tmp/pradeep/test/shell && tar xjvf /home/pradeep/songs.tar.bz |
Re: Shell Tips & Tricks
Really interesting & useful
|
Re: Shell Tips & Tricks
nice one. Really helpful
|
Re: Shell Tips & Tricks
Nomination for Article of the month - Aug 2009 Started.
|
Re: Shell Tips & Tricks
nice tips.
Came to know some new commands. Thanks |
Re: Shell Tips & Tricks
great info carry on.
|
Re: Shell Tips & Tricks
Code:
Really good thanks |
Re: Shell Tips & Tricks
thank you very much...
this is really a good post... |
| All times are GMT +5.5. The time now is 14:14. |