LinuxQuestions.org
Help answer threads with 0 replies.
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, 04: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, 04:47 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

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

(i.e. descend into subdirectories)
 
Old 10-08-2007, 06: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 11:12 AM
copying files exelte Ubuntu 1 05-22-2007 12:04 PM
Copying files YunaFF102 Linux - Newbie 4 07-21-2006 05:06 AM
copying files Sol0 Linux - Software 7 08-18-2003 10:40 AM
Copying Files... viperquest Linux - Software 3 03-07-2003 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 AM.

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
Open Source Consulting | Domain Registration