C
csalcedo1994
Guest
This is what I have to do I did steps 1-6 already i need help in 7-10 I JUST need to know the commands for creating the argument to do that.
- Using the terminal, move your last script from its current location to a folder you will create under your home directory (~) called bin
- Rename that file in your new bin folder to mybackup
- Add bin to your path
- To do this, type export PATH=$PATH:~/bin
- Before proceeding, ensure that your script uses absolute paths rather than relative paths
- Make sure to take note of the commands you just used in steps 1-4
- Modify the script file now stored in your bin folder so that it accepts an arguement
- The new arguement will be a path for a folder you want backed up
- Your script will replace each instance of /var with that arguement
- You should be able to run your script from anywhere in Linux and have it backup to a set location
- Alter your filename so that your path becomes a part of it, along with the date