LinuxQuestions.org
Visit Jeremy's Blog.
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 05-26-2002, 11:59 AM   #1
medamnit
LQ Newbie
 
Registered: Apr 2002
Location: Australia
Distribution: RedHat
Posts: 16

Rep: Reputation: 0
overwrite directory copy


i'm backing up a few files & dirs into a directory.

cp -R /dir/ /tmpdir/

how do i overwrite the previous backup. just say if i backup on sat'day, run the command on sunday, the sat'day files are still there and are not updated.

am i doin this right? any other suggestions would be great.

thank you
medamnit
 
Old 05-26-2002, 12:09 PM   #2
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
Don't confuse copying files with backing them up.

Files of the same name will be overwritten by the newer copy. Orphaned files will be left untouched. If you want to only copy your current fileset, delete the old one first.

Regards
 
  


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
Bash - rename directory to overwrite existing LarsWestergren Linux - Newbie 18 04-04-2013 02:07 PM
copy files from directory to directory without subfile ALInux Linux - General 2 06-03-2005 11:51 AM
mv: cannot overwrite directory `/home/tcma/src/buildroot/build_i386/linux-2.4.27-tcma tcma Linux - Software 1 10-05-2004 03:46 PM
Copy and Overwrite jrdioko Linux - Newbie 2 06-29-2004 11:46 AM
Please help, how do I copy one file to another directory lexington Linux - Newbie 4 04-04-2004 10:17 AM


All times are GMT -5. The time now is 06:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration