From: Simon Ruderich Date: Tue, 2 Apr 2013 01:33:59 +0000 (+0200) Subject: shell/aliases: Add aliases mv (mv -i) and cp (cp -i -a). X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=e705d5d7358e42a35dba8994f0ea4c445e4f0c81 shell/aliases: Add aliases mv (mv -i) and cp (cp -i -a). --- diff --git a/shell/aliases.in b/shell/aliases.in index 27ce92c..023ed60 100644 --- a/shell/aliases.in +++ b/shell/aliases.in @@ -29,6 +29,15 @@ alias s=mpc # s for sound, m is already used alias v=vim +# Ask for confirmation before overwriting files. Especially useful when moving +# to a different directory. No alias for `rm` because I specify the files to +# remove directly, so I know what will happen. +alias mv='mv -i' +# Additionally preserve all file attributes when copying, this includes +# copying symbolic links as is without dereferencing them. +alias cp='cp -i -a' + + # Make sure there is no alias named ls as it causes problems with the # following ls function on (at least) bash 4.0.35. unalias ls 2> /dev/null