Using the mv and copy cmd's in Unix
I often catch myself renaming a file in some other directory like this,: mv some/dir/some/file some/dir/some/file_renamed.
:
: But there is an easier way:
: mv some/dir/some/{file,file_renamed}
:
: This also works for copying:
So instead of this.
mv some/dir/some/file some/dir/some/file_renamed
Use this plus the cp examples below
mv some/dir/some/{file,file_renamed}
cp /etc/mail/{sendmail.cf,sendmail.cf.orig}
cp /etc/{sysctl.conf,sysctl.conf.`date +%F`}