coreutils
[Top][All Lists]
Advanced

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

Re: Move Command Feature


From: Eric Blake
Subject: Re: Move Command Feature
Date: Fri, 05 Apr 2013 11:42:01 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 04/05/2013 11:23 AM, Michael Boldischar wrote:
> Hello,
> 
> This is a suggestion for a new feature in the "mv" command.  This feature
> applies to moving directories.  If a user moves a directory with a lot of
> files and encounters an error, it can often leave the source directory in a
> partially moved state.  It makes it hard to redo the operation because the
> source directory has changed.
> 
> The feature I'm looking for is a flag in the "mv" command that preserves a
> copy of the source directory until the entire tree has been successfully
> copied to the destination directory.  At that point, the move command can
> delete the source directory.  That way, a user can fix the error and rerun
> the same move command.  It makes it easier and less of a headache.
> 
> There might be other ways to accomplish this.  But, I would use this
> feature all the time if it were available.  I call it the "safe move
> operation."

This sounds like something that rsync can already do.  In that case,
rather than wait for someone to write the feature into mv (and
successfully argue that it is not adding bloat), and then for that
feature to finally propagate into the distros that you commonly use; it
would be easier to figure out the appropriate rsync
--remove-source-files invocation that does what you want.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]