Marc SCHAEFER wrote:
>
> On Fri, 20 Oct 2000, Marc Mongenet wrote:
>
> > cp -rp /tmp /home/tmp
> > mv tmp tmp.old
> > ln -s /home/tmp tmp
>
> su - -c 'cp -Rdp /tmp /home/tmp && mv /tmp/tmp.OLD && ln -s /home/tmp /tmp)
Je ne comprend pas toutes les différences entre -r et -R. Selon info :
`-r'
Copy directories recursively, copying any non-directories and
non-symbolic links (that is, FIFOs and special files) as if they
were regular files. This means trying to read the data in each
source file and writing it to the destination. Thus, with this
option, `cp' may well hang indefinitely reading a FIFO, unless
something else happens to be writing it.
`-R'
`--recursive'
Copy directories recursively, preserving non-directories (see `-r'
just above).
Clairement -r peut poser des problèmes avec les fichiers spéciaux,
mais que fait au juste -R, que signifie « préserver les non-répertoires » ?
Peut-on par exemple copier un pipe ?
--
Marc Mongenet
--
http://www-internal.alphanet.ch/linux-leman/ avant de poser
une question.