RE: mv command behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> I would suggest rsync for this task.  You could use it to sync
> /tmp/dirA/dirB with /dirC/dirB, deleting files not in /tmp/dirA/dirB
> from /dirC/dirB something like this:
> 
> $ rsync -av --delete /tmp/dirA/dirB/ /dirC/dirB/
> 
> The trailing slashes are significant, so check out the rsync man page
> for more details.
> 

[Peter Lauri - DWS Asia] 

Hi,

But I just want to perform a simple move. This will perform a copy of the
files, and remove files in /dirC/dirB that should still be there.

After the copy of the file is completed, the file in the SOURCE should be
deleted. But --delete will delete files from the DESTINATION that are not in
SOURCE, so the complete opposite of what I want :)

I assume I have to write my own script for this that copies FILE BY FILE and
checks if it was copied correctly, and then delete it from the tmp dir.

/Peter


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux