To read all comments associated with this story, please click here.
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.
I didn't know about noclobber. I may use that. But, the "-i" stuff just gets on my nerves.
Here's a tip for you. You don't have to log out to reread the dot files. All you need to do is at the command prompt: ". .profile". For clarification, at the command prompt, type a "dot" followed by a "space" followed by the name of the hidden resource file you wish to reread.






Member since:
2007-12-26
If this works, it's no more ext2 for me. I never switched to ext3 because for some reason I never learned stop doing this...
$ rm * -R
Hmm, why did that take so long, did I forget something?
$ pwd
/home/righard
yes i did, damn