bug-fileutils
[Top][All Lists]
Advanced

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

Re: Findutils / mv


From: David T-G
Subject: Re: Findutils / mv
Date: Fri, 21 Feb 2003 05:27:50 -0500
User-agent: Mutt/1.4i

Patrik --

...and then Patrik Kullman said...
% 
% Hey,

Hiya!


% 
% I just reflected over why a directory structure can't "complete" an
% already existing, equally built, directory structure.
...
% 
% Why is this?

Because mv moves rather than just copies into.  Think of a directory as a
bucket -- a quite solid bucket -- with directories and files in it.  If
you already have a bucket with that name, then the new bucket would step
on it when it is moved over.  mv is not something that will move the
contents of one bucket into another bucket as you think of it at this
level (yes, I know you have two big tubs that are dir1 and dir2 and
you're moving all of the buckets in the dir2 tub, but let's keep the
example on one level :-) but instead is something that is actually moving
the bucket and everything that comes along with it.  It would have to
replace dir1/subdir1 when it moves dir2/subdir1 into dir1.  You could
move the files (although in the example you give the dir2 files, since
they have the same name, will also step the dir1 files out of existence)
in a case like that, but cp or tar may be the easier route, just as you
showed.


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) address@hidden * society and not sufficient moral courage.
(work) address@hidden  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgpeJwlHn7mk4.pgp
Description: PGP signature


reply via email to

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