merging file sub-trees
Lee D. Rothstein
lee at veritech.com
Mon Jun 2 15:07:04 EDT 2003
I want to be able to merge one
sub-directory tree over another. I used
to be able to do this before the
posuxide of GNU/UNIX. [In the past I've
been very impressed with how GNU
utility writers have offered POSIX
stuff, and alternatives allowing users
to decide on how many PSI (POSIX
Sucking Idiocies) they wanted to
"ingest".]
And, yes, I have RTFMed until I'm blue
in the [file-system]-space. ;-)
At various different times 'mv' alone;
or 'cp' followed by an 'rm' would do
this, but alas, no more.
In brief, I want the merge to move
everything from 'a' into 'c',
overwriting all like-named files, and
merging everything else
Example:
--------
Two original directories in the current
directory: 'a', 'c'.
I would issue following command:
$ merge a c
on the following subtrees:
--
a/
1.txt
a.txt
a/b/
3.txt
tenex.c
a/c
foo.txt
foobar.txt
--
c/
c/a/
1.txt
os360.o
c/a/b/
tenex.c
larrysucks2.bat
c/b/
aardvark.texi
bleet.1
c/b/a/
billsux.alot
--
to yield the following results:
--
c/
c/a/
1.txt
a.txt
os360.o
c/a/b/
3.txt
tenex.c
larrysucks2.bat
c/b/
aardvark.texi
bleet.1
c/b/a/
billsux.alot
--
How can I do this without writing the
shell script from hell.
--
Lee D. Rothstein -- lee at veritech.com
VeriTech -- 603-424-2900
7 Merry Meeting Drive
Merrimack, NH 03054-2934
More information about the gnhlug-discuss
mailing list