I want to copy some files/folders to a USB Flash Drive, SSD, or HDD after I connect them to my laptop. I don't want to detect the USB, do extra stuff, etc.. I just want to run a script from my terminal, which copies specified files to a specified external drive.
Earlier I have written
alias onetbeans='sudo /usr/local/netbeans-8.2/bin/netbeans'
in my .bashrc file to open netbeans by just writing onetbeans.
I wished to know if there is anything similar I can do for copying files? I would only copy some specific files/folder which I can mention.
cp -R [folder to copy] /media/shray/[name of usb/hard drive]
Now, my [folder to copy] is constant. But how do I take care of different names a usb can take? For example, if I need to copy to a usb named "myusb" then I can write
alias customcopy='cp -R ~/Desktop/copyFolder /media/usb/myusb/'
But how do I take care of changing USB drive names?