I'm trying to write a script that runs on startup and copies any files on any attached USB drive to a specific directory but without the containing directories.
So i have a USB drive called Data, on data there is a 2 directories, Dir1 & Dir2, in each directory there is a file. Dir1File.txt and Dir2File.txt.
I want to copy the two files to /home/data but if i run
rsync -av /media/* /home/data
data then has a directory called Data, inside which are Dir1 & Dir 2 inside which are the respective files. Can this be done?