Sami Kerola wrote: > Either this is bug or an unintuitive feature. > > s...@lelux ~/foo touch src dest > s...@lelux ~/foo chmod g-rwx src > s...@lelux ~/foo chmod g+rwx dest > s...@lelux ~/foo ls -l > total 0 > -rw-rwxr-- 1 sake sake 0 2009-03-30 13:16 dest > -rw----r-- 1 sake sake 0 2009-03-30 13:16 src > s...@lelux ~/foo cp --force --backup=t src dest > s...@lelux ~/foo ls -l > total 0 > -rw----r-- 1 sake sake 0 2009-03-30 13:16 dest > -rw-rwxr-- 1 sake sake 0 2009-03-30 13:16 dest.~1~ > -rw----r-- 1 sake sake 0 2009-03-30 13:16 src > > In case this is bug the patch is good. In case of feature it should be > modified to make sure that permissions are different.
It's a feature. With --backup, an existing destination is first moved aside (renamed), and thus the backup retains all attributes. That's the idea of making a backup, after all: preserve as much initial state as possible. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
