I have a function in my .bashrc that I use to backup files:
backup() {
filename=`date +F-%H-%M`-"$@"
/bin/cp -fr "$@" ~/backup/$filename
}
and I would like to make an alias to easily backup a project in the folder foxhound:
alias backfox="backup /home/projects/Foxhound"
I get the error
/bin/cp: cannot create directory `/home/username/backup/2012-01-23-15-03-/home/projects/Foxhound`: No such file or directory
You may want to add:
before the
cpline.