rename and chmod (was: cp -p)
Jerry McAllister
jerrymc at msu.edu
Fri Feb 8 15:57:34 UTC 2008
On Fri, Feb 08, 2008 at 12:30:57PM +0100, Pietro Cerutti wrote:
> Wouter Oosterveld wrote:
> >> Now, from a logical point of view, why moving a file into a directory
> > doesn't fall into the "created into them" case?
> >
> > Because (if on the same filesystem) you don't create a new file. You
> > just link the file in the destination dir and unlink the file from the
> > source dir.
>
> Exactly. But from a /*logical*/ point of view, shouldn't this case be
> treated /*as if*/ the file was created inside the target directory?
Not if you use mv. If you use cp, then it could.
By definition, mv only moves the pointer/link or whatever it is called
and doesn't change anything else.
////jerry
>
> >
> > Regards,
> >
> > Wouter
>
>
> --
> Pietro Cerutti
>
> PGP Public Key:
> http://gahr.ch/pgp
>
More information about the freebsd-questions
mailing list