LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Omitting Directory Error (https://www.linuxquestions.org/questions/linux-general-1/omitting-directory-error-541108/)

carlosinfl 03-27-2007 04:11 PM

Omitting Directory Error
 
I am attempting to back up my data from my "USBDRIVE" which is /dev/sdc1.

I have a directory called "backup" on my Desktop and when I try to "cp", I get the following error and am not sure how to resolve.

Code:

cwilliams@tank:/media/USBDRIVE$ ls -l
total 192
-rwx------  1 cwilliams cwilliams    67 2007-02-01 18:08 apt.txt
drwx------  6 cwilliams cwilliams 32768 2007-03-15 19:06 cwilliams
drwx------  7 cwilliams cwilliams 32768 2007-03-15 18:43 ghost
-rwx------  1 cwilliams cwilliams  2511 2007-03-05 13:03 linux_commands.txt
drwx------ 41 cwilliams cwilliams 32768 2007-03-06 15:00 music
-rwx------  1 cwilliams cwilliams  235 2007-02-09 16:37 mysql.txt
cwilliams@tank:/media/USBDRIVE$ cp /media/USBDRIVE/* /home/cwilliams/Desktop/backup/
cp: omitting directory `/media/USBDRIVE/cwilliams'
cp: omitting directory `/media/USBDRIVE/ghost'
cp: omitting directory `/media/USBDRIVE/music'


trickykid 03-27-2007 04:14 PM

Perhaps you need to specify the -r. Usually that error is indicating you're trying to copy over a directory that already exists in the destination.

cgjones 03-27-2007 04:14 PM

I think you need to use the recursive switch with cp.

carlosinfl 03-27-2007 04:21 PM

It appears you get the error if the directory you're trying to copy does not exist in the target directory as well. Anyways, the "-r" tag seemed to do the trick. Sorry I did not think of that and thanks for your help!

eredwood007 01-19-2015 05:30 AM

Thank you your anwser was right on the mark.
 
I love Linux and I want to really thank you guys for the time you put in to help us out. Again Thank you.


All times are GMT -5. The time now is 10:32 AM.