#1 Le 08/09/2017, à 19:40
- metalux
Que fait l'option --no-dereference de ln?
Bonjour,
d'après le man:
-n, --no-dereference
traiter NOM_DU_LIEN comme un fichier ordinaire si c'est un lien
symbolique vers un répertoire
Je ne comprends pas à quoi ça sert, y-a-t-il quelqu'un pour m'expliquer cette option de ln?
Hors ligne
#2 Le 08/09/2017, à 21:20
- Vobul
Re : Que fait l'option --no-dereference de ln?
Salut,
Plus d'infos sur la page info:
info ln
‘-n’
‘--no-dereference’
Do not treat the last operand specially when it is a symbolic link
to a directory. Instead, treat it as if it were a normal file.When the destination is an actual directory (not a symlink to one),
there is no ambiguity. The link is created in that directory. But
when the specified destination is a symlink to a directory, there
are two ways to treat the user’s request. ‘ln’ can treat the
destination just as it would a normal directory and create the link
in it. On the other hand, the destination can be viewed as a
non-directory—as the symlink itself. In that case, ‘ln’ must
delete or backup that symlink before creating the new link. The
default is to treat a destination that is a symlink to a directory
just like a directory.This option is weaker than the ‘--no-target-directory’ (‘-T’)
option, so it has no effect if both options are given.
Vobul
Utilisez le retour utilisable de commandes !!!
J'aime la langue française, mais je parle franglais, deal with it.
RTFM
En ligne
#3 Le 09/09/2017, à 19:17
- metalux
Re : Que fait l'option --no-dereference de ln?
info me donne un peu plus d'info, logique non?
Plus sérieusement ça ne m'aide pas beaucoup, je n'arrive pas à saisir le sens de cette commande. Un exemple peut-être? Le RTFM ne m'a jamais vraiment réussi, essayer de comprendre les scripts des autres un peu plus.
Hors ligne