[Wylug-discuss] Moving files incrementally
borph at gmx.de
borph at gmx.de
Thu Oct 4 20:51:10 UTC 2012
Thanks a lot! That does the trick, and the idea to create the directories
upfront was a good one. I'm so unfamiliar with the command-line magic
(although using Linux since ages) that I'm happy that you helped me out.
The access rights would have been indeed a stopper, but as I knew before I
fixed that.
I agree it's an obscure requirement: usually when you move across FS
boundaries, you assume that you need the space in the destination anyway.
Stacked file systems are an exception to that.
Peter
2012/10/4 Paul Brook <paul at codesourcery.com>
> > I have a question about a very basic Linux functionality: moving files!
> But
> > unfortunately neither Gnome or "mv" seemed to have the mode I need.
> >
> > I have my data in an eCryptFS encrypted folder, but want to move it over
> to
> > encFS. I have both folders mounted and can move the files now, but I was
> > running into one problem: I don't have space enough! Unfortunately ever
> > move command across file system boundaries seems to first copy
> everything,
> > then delete the source.
> >
> > Is there a way to move the files incrementally? I know that when
> something
> > is moving and deleting file-by-file, there is a risk to have an
> > half-finished state, but I guess it wouldn't be the end of the world, as
> > you can simply issue the command again, as long as it merges directories.
>
> I doubt there exists any standard recipe for dowing this. It's a pretty
> obscure requirement - in practice if you end up in this situation then
> you're
> probably doing something else wrong.
>
> That said, a basic implementation using find, mv and possibly xargs should
> be
> fairly straightforward[1]. The trick is probably to create the whole
> directory structure first, then worry about the individual files. If you
> have
> multiple users and varied permisions then a little more care is required.
>
> Paul
>
> [1] e.g. (not tested at all):
> find . -type d -exec mkdir -p $dest/'{}' \;
> find . -not -type d -exec mv '{}' $dest/'{}' \;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wylug-discuss/attachments/20121004/323781ee/attachment.html>
More information about the Wylug-discuss
mailing list