I am trying to create an alias in my bash profile such that I can call
backup_dir Playground
and have it complete:
cp -r Playground $HOME/BACKUP
I would also like to ensure that if the file/directory is of the same name it is just overwritten.
The code I input in my bash_profile is as follows:
alias backup='cp $2 $HOME/BACKUP/$2'
alias backup_dir='cp -r $2 $HOME/BACKUP/$2'
I also tried it with $1 but it did not work either.
What actually occurs is that it copies the contents of my backup directory and creates it in the directory I'm supposed to be copying/copying from.