Ralph Shumaker wrote:
Stewart Stremler wrote:
begin quoting Ralph Shumaker as of Wed, Sep 21, 2005 at 07:48:37PM
-0700:
there because of the timestamp. And there are a whole *lotta*
links. I can pipe through a 'grep -v " --> "' and get a much
smaller output. And although this assures me that the objects of
the links copied fine, it eliminates the certainty that all *links*
got copied. Is there a way to make cp keep the timestamps of the
copied links? As far as I can tell, any attempt to modify the
timestamp of the link just gets applied to its target.
What if the target isn't there?
mv $target $target.__save__
touch $link blah blah blah
mv $target.__save__ $target
Perhaps I'm just really tired, but I don't get what you're trying to
say here. I get lines 1 and 3, but the purpose of line 2 eludes me.
Also eluding me is why you're using "mv". I don't see how that
relates to my question.
It *must* have been because I was so sleepy. I just read it again
(after a good sleep) and I got it.
My wondering about why you were using "mv" is what made me finally get
it. If the target is not there, then the effects of "touch" cannot be
redirected and likely will be applied to the link itself. But in my
case, there are *far* too many links to do this myself.
Why doesn't "cp" copy (or set up) the link first? Must the target be
there in order to be able to copy (or set up) the link?
Could "cp" be made to first "touch" a zero-byte target, set up the link,
wipe out the previous touch-file, touch the date of the new link to the
date of the source link, and *then* copy the target?
Are there any utilities that can give that result?
Ultimately, though, this probably doesn't matter. Carl's suggestion of
"diff -r -q [source-dir] [target-dir]" is probably going to eliminate my
need for the dates to match between the source links and the copied
links. I can be a bit of a perfectionist though, and still would
/prefer/ that the dates and sizes all match to make me /feel/ like the
copy is a perfect copy. But fortunately, sometimes I'm able to slide
past my tendencies for perfection, squeeze myself through to the bottom
line, and get things done. But that doesn't kill my desire that the
copy matches the source, even in appearance.
The other thing that is disconcerting about the cp, ll, diff I do is
that directory sizes don't necessarily stay the same. If the size
differs at all, usually the copy is taking less space. (I don't
remember seeing any that ended taking more.) But this occurrence is
much, much less frequent than the link dates changing.
Yes, that's expected.
I don't understand why, although I think I have an idea. But my idea
is immaterial. When it comes to the actual size of the directory
copy, I would prefer that the size matches, but am satisfied if all of
that directory's contents match.
Is there a utility that I could run on the source drive (before copying)
that would trim of the unused space still taken up by directories that
no longer need it? (Damn it, I want the copy to *look* like it's a
perfect copy. :-) )
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list