Bash Shell Aliases Ask Before Remove or Overwrite

See section #16: Add safety nets of “30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X“.

alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'

The code is added to .bashrc located in the user home directory.  After restarting terminal, the user is prompted for confirmation before deleting and overwriting files.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s


%d bloggers like this: