Copy Files From Flash Drive To Ubuntu
You give directory as source argument and expect cp
to copy the files. To do this, use -r
(recursive) option:
sudo cp -r -i /media/owner/ESD-USB/mysql /var/lib/
This will create (or overwrite the content of) /var/lib/mysql/
directory. You probably want it that way. Otherwise, if you want to copy the files from within mysql
to /var/lib/
(i.e. not to /var/lib/mysql/
) you may use:
sudo cp -i /media/owner/ESD-USB/mysql/* /var/lib/
Related videos on Youtube
user2676140
By Day: Work as an IT Dork By Night: Father and Husband By Weekends: Relaxing and enjoying life
Updated on September 18, 2022Comments
-
user2676140 almost 2 years
I am attempting to copy files from my flash drive to my local drive on Ubuntu. This is the command that I ran
sudo cp -i /media/owner/ESD-USB/mysql /var/lib/
But that output a message of - and the files were not copied over (replacing the original files)
cp: omitting directory '/media/owner/ESD-USB/mysql'
What do I need to do in order to copy this directory from my flash drive and over write the current directory on my hard drive?