Linked by Amjith Ramanujam on Tue 15th Jul 2008 22:49 UTC
Permalink for comment 323183
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.





Member since:
2006-01-07
Put the following into your .bashrc and .bash_profile files:
PS1="\u@\h:\w> "
export PS1
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
set -o noclobber
The first two lines will set your command line prompt to show you which directory you are in. No more need for the "pwd" command.
The three "alias" lines will for you to confirm with a yes/no prompt before deleting, copying or moving a file.
The "noclobber" line will prevent you from overwriting an existing file. If you want to overwrite a file, you'll have to manually delete the old one first.
Of course, you have to logout/login one time for these settings to take effect, because that restarts the bash shell.