LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2007, 05:24 AM   #1
drudge
Member
 
Registered: Dec 2006
Posts: 36

Rep: Reputation: 17
Advice on cp for copying missing files


Hi, I have a 40gb backup folder 'samples' with multiple nested folders.
I have a copy of this folder on another partition for general use.

backup :- /mnt/hda3/samples
user :- /mnt/hdb7/samples

Many folders/files from the everyday folder are now missing.
I wish to copy the missing folders/files back to /mnt/hdb7/samples folder.

I have tried cp -u /mnt/hda3/samples /mnt/hdb7 but the response is

"cp: omitting directory `/mnt/hda3/samples'"

so I tried cp -u /mnt/hda3/samples/* /mnt/hdb7 but the the next
layer of folders are omitted.

ie
cp: omitting directory `/mnt/hda3/samples/folder1'
cp: omitting directory `/mnt/hda3/samples/folder2'
cp: omitting directory `/mnt/hda3/samples/folder3'
cp: omitting directory `/mnt/hda3/samples/folder4' ... etc

Any advice on the correct usage?
I didn't want to make a whole new copy as it takes hours.

Thanks
 
Old 10-08-2007, 05:47 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
-R, -r, --recursive
copy directories recursively

(i.e. descend into subdirectories)
 
Old 10-08-2007, 07:29 AM   #3
drudge
Member
 
Registered: Dec 2006
Posts: 36

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by David the H. View Post
-R, -r, --recursive
copy directories recursively

(i.e. descend into subdirectories)
That worked great, thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files paddyjoy Linux - Newbie 10 10-25-2013 12:12 PM
copying files exelte Ubuntu 1 05-22-2007 01:04 PM
Copying files YunaFF102 Linux - Newbie 4 07-21-2006 06:06 AM
copying files Sol0 Linux - Software 7 08-18-2003 11:40 AM
Copying Files... viperquest Linux - Software 3 03-07-2003 03:41 PM


All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration