On Sun, Jan 27, 2002 at 11:47:02AM -0700, Bob Proulx wrote: > > > That's the way that cp -p pretty much always works, if the -p flag is > > > supported. See, for example, the GNU fileutils documentation: > > > > not always (I'm pretty sure that very-old implementations of -p did not > > copy _all_ of the attributes, since I had work-arounds in some code for > > that). > > In particular symlinks. It follows symlinks instead of copying them.
I don't see it in my rcs logs, but I seem to recall that "cp -p" would copy timestamps but not protection modes on Apollo SR9.something. > The GNU cp -a extension is wonderful for this since it copies symlinks > as symlinks. To bad more operating systems have not picked up that > option as well. tar works too... (but I've found it generally more useful to copy symlinks as symlinks than the targets). > However, you might be thinking of the three atime, ctime and mtime > values that are stored by the filesystem for files. You can set any > two, you pick, but never all three. actually I'm well aware of the distinction. I use my own copy utility, which I wrote back when I first encountered "cp -r" on a BSD system in the 80's. (It had an unfortunate habit of dumping core, and wasn't implemented on Apollo anyway). -- Thomas E. Dickey <[EMAIL PROTECTED]> http://invisible-island.net ftp://invisible-island.net