i would like to add the path to inserted flash drive named backup1 to a variable so i can copy /Documents/dir to this flash drive path in one script without user interaction
Asked
Active
Viewed 82 times
1 Answers
1
Try B=/Volumes/backup1 and then cp -p /Documents/dir/* $B.
lhf
- 7,278
-
now i wanted to eject with the same $B and got umount: unmount(/Volumes/backup1): Operation not permitted – scrappy Mar 31 '17 at 01:20
-
@scrappy, ask a separate question, but see http://apple.stackexchange.com/questions/271252/disconnect-connect-usb-device-from-command-line first – lhf Mar 31 '17 at 01:21