[comp.unix.questions] Berkley-isms

Kemp@DOCKMASTER.NCSC.MIL (11/20/89)

 > You think that ISC's csh is bad, just try the one that ATT ships
 > on their version of the 386 software!  Eech!.
 >
 > My guess at the reason.  Csh is a Berkley [sic] development and
 > SystemV people don't care for Berkley-isms.  I once complained
 > about the absence of '-r' on the System V cp command and was told,
 > in effect, that in that context, '-r' was an offence against
 > Decency and the Natural Order of Things.

As implemented by Berkeley (or at least in SunOS), cp -r *is* an offense
against Decency and the Natural Order of Things.  Of course, so is 'cd
fromdir; tar cf - .  | (cd todir; tar xvf -)'.  So is 'find blah blah
blah | cpio -p'.

I don't think that having a simple command to 'make an exact copy of
this directory hierarchy' is inimical to the Unix Philosophy of 'do one
job and do it well'.  If cp -r wasn't such a botch, it would be worth
having.

Just for the record, is there *any* way to do a recursive copy
correctly?  I.e.  one that doesn't:

 * turn symbolic links into actual files
 * turn link loops into a series of infinitely nested copies
 * alter the modify and change times
 * choke on block and character special files
 * turn holes in sparse files into real disk blocks

   Dave Kemp <Kemp@dockmaster.ncsc.mil>

pricked@vax1.acs.udel.EDU (Jenn-Ming Yang) (11/21/89)

In article <21495@adm.BRL.MIL> Kemp@DOCKMASTER.NCSC.MIL writes:
>Just for the record, is there *any* way to do a recursive copy
>correctly?  I.e.  one that doesn't:
> * alter the modify and change times


so what your saying is that you want a file whose creation time is
after the modify and change times? or did you mean something else?


-- 
pricked@vax1.acs.udel.edu (or pricked@192.5.57.1, pricked@192.5.57.129)
!!!!!!!!!!!!!!!!!!!!!!!!There is no substitute!!!!!!!!!!!!!!!!!!!!!!!!!
!!played lums pond? why not? are you weak or do you just have brains?!!

pim@cti-software.nl (Pim Zandbergen) (11/21/89)

Kemp@DOCKMASTER.NCSC.MIL writes:



>Just for the record, is there *any* way to do a recursive copy
>correctly?  I.e.  one that doesn't:

> * turn symbolic links into actual files
> * turn link loops into a series of infinitely nested copies
> * alter the modify and change times
> * choke on block and character special files
> * turn holes in sparse files into real disk blocks

I think afio will do this. I am not sure about the symlink
stuff, though, as we're a SYS V only site.
-- 
Pim Zandbergen                                   domain : pim@cti-software.nl
CTI Software BV                                  uucp   : ..!uunet!ctisbv!pim
Laan Copes van Cattenburch 70                    phone  : +31 70 542302
2585 GD The Hague, The Netherlands               fax    : +31 70 512837

lehners@uniol.UUCP (Joerg Lehners) (11/21/89)

Hello !

pim@cti-software.nl (Pim Zandbergen) writes:

>Kemp@DOCKMASTER.NCSC.MIL writes:
>>Just for the record, is there *any* way to do a recursive copy
>>correctly?  I.e.  one that doesn't:
>> * turn symbolic links into actual files
>> * turn link loops into a series of infinitely nested copies
>> * alter the modify and change times
>> * choke on block and character special files
>> * turn holes in sparse files into real disk blocks
>I think afio will do this. I am not sure about the symlink
>stuff, though, as we're a SYS V only site.

Well, on our V.3 System 'cpio' itself is able to handle sysmbolic links
(the version of V.3 call Munix-3.1 has symlinks hacked in, but just
absolute ones), restore atime and mtime, does not choke on special files.
But: as Dave Kemp said: nor cpio neither tar is able to deal with
holes in file, nor cpio neither tar is able to restore the status
change time (ctime). Because the symlinks in Munix V.3 are just absolute
the copied sysmlinks point to files in the original hierarchy and not in
the copied hierachy.
Another problem are hard linked files. cpio itself is able to restore
hard linked files but not under all circumstances.

  Joerg
--
/ UUCP:    lehners@uniol              | Joerg Lehners                  \
|       ...!uunet!unido!uniol!lehners | Fachbereich 10 Informatik ARBI |
| BITNET:  066065 AT DOLUNI1          | Universitaet Oldenburg         |
\ Inhouse: aragorn!joerg              | D-2900 Oldenburg               /

Kemp@DOCKMASTER.NCSC.MIL (11/22/89)

Jenn-Ming Yang <pricked@vax1.acs.udel.edu> writes:
 > Kemp writes:
 >> Is there any way to do a recursive copy that doesn't:
 >> * alter the modify and change times
 >
 > so what your [sic] saying is that you want a file whose creation
 > time is after the modify and change times? or did you mean something
 > else?

What I meant was UNIX, since this is the info-unix list.  And, as has
been thoroughly hashed out here, unix has NO CREATION TIME.  If you want
an explanation of atime, mtime, and ctime, RTFM.

  Dave Kemp <Kemp@dockmaster.ncsc.mil>
 ------------------------------------------------------------
   pricked??? are you kidding?!!!!! (and we thought yahoo was a hoot)

chip@ateng.com (Chip Salzenberg) (11/22/89)

According to pricked@vax1.acs.udel.EDU (Jenn-Ming Yang):
>In article <21495@adm.BRL.MIL> Kemp@DOCKMASTER.NCSC.MIL writes:
>>Just for the record, is there *any* way to do a recursive copy
>>correctly?  I.e.  one that doesn't:
>> * alter the modify and change times
>
>so what your saying is that you want a file whose creation time is
>after the modify and change times?

Exactly.  Which is what chmod does, too.
-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg at A T Engineering;  <chip@ateng.com> or <uunet!ateng!chip>
    "Did I ever tell you the Jim Gladding story about the binoculars?"