Linked by Amjith Ramanujam on Tue 15th Jul 2008 22:49 UTC
Thread beginning with comment 323183
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Comment by righard
by backdoc on Wed 16th Jul 2008 15:23
in reply to "RE: Comment by righard"
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.
RE[3]: Comment by righard
by FunkyELF on Thu 17th Jul 2008 14:43
in reply to "RE[2]: Comment by righard"






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.