Need a bash script from a bash expert. GUI's are nice but they have also rotted my brain and I have forgotten 99% of my CLI knowledge. What happens when the CLI is gone
Okay I have 2 USB flash disks that I back-up all really important financial data to every time it changes.
Right now I have a script that I have to change in the editor whenever I upgrade to a larger capacity flash drive. When I upgrade, the label on the flash drive changes which changes the directory under which the flash drive is mounted, thus requiring the manual change to the script.
What I would like to have is a single script that will do the copy to all directories under '/media'.
My current script is:
I would like to replace the 'cp' lines with something so that the flash drive directory under '/media' isn't hardcoded.
Suggestions??
Okay I have 2 USB flash disks that I back-up all really important financial data to every time it changes.
Right now I have a script that I have to change in the editor whenever I upgrade to a larger capacity flash drive. When I upgrade, the label on the flash drive changes which changes the directory under which the flash drive is mounted, thus requiring the manual change to the script.
What I would like to have is a single script that will do the copy to all directories under '/media'.
My current script is:
Code:
# extraneous housekeeping # echo "Updating to Flash Drive - Financial" cp --update -v -R ~/financial/* /media/TRAVELDRIVE/financial cp --update -v -R ~/financial/* /media/RUNDISK/financial #extraneous housekeeping
Suggestions??
Comment