Copy directory subsets?

Alan Dayley alandd at consultpros.com
Tue Jun 6 21:21:36 MST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

But will it overwrite the older files IN the directory?  I should try it
instead of asking...

Alan

Nathan England wrote:
> can you run cp -ru ? That should only update the newer files and not overwrite 
> a directory.
> 
> On Tuesday 06 June 2006 21:08, Alan Dayley wrote:
>> This is a problem that has bugged me for a while and I just have to ask.
>>
>> Directory 'destination' contains:
>> file1
>> file2
>> file3
>> file4
>> Dir1
>>   dir1file1
>>   dir1file2
>>   dir1file3
>>
>> Directory 'source' contains:
>> file2
>> file3
>> Dir1
>>   dir1file3
>>
>> I want to copy the entire 'source' directory into 'destination' such
>> that 'source/file2' 'source/file3' and 'source/Dir1/dir1file3' overwrite
>> the existing files in 'destination'.
>>
>> A normal 'cp' or 'mv' or drag and drop in Konqueror is fine for 'file2'
>> and 'file3'.  But it will wipe out the 'destination/Dir1' replacing it
>> with the 'source/Dir1' that only has one file in it.  I want a copy
>> operation that will overwrite 'destination/Dir1/dir1file3' while leaving
>> the other files in the directory in place.
>>
>> Does that make sense?
>>
>> Anybody know how to do this?  Am I simply missing a copy
>> command/operation option?
>>
>> Alan
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>> To subscribe, unsubscribe, or to change  you mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEhlRQDQw/VSQuFZYRAk7gAJ9fEvdX6MbDD2l8dYByZKAOT5D9eACfVnBx
gHyNb3zU1uk/Wa08RpsLT+g=
=NVGp
-----END PGP SIGNATURE-----


More information about the PLUG-discuss mailing list