Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-26-2002, 12:59 PM   #1
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
Old 05-26-2002, 01:09 PM   #2
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.



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

All times are GMT -5. The time now is 05:58 PM.

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