Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ln

Some strings on this page have not been translated yet. You can help by translating them on Weblate.
v0.13.0
ln [OPTION]... [-T] CIBLE NOM_LIEN
ln [OPTION]... CIBLE
ln [OPTION]... CIBLE... RÉPERTOIRE
ln [OPTION]... -t RÉPERTOIRE CIBLE...

Créer des liens entre fichiers

Options

--backup=<CONTROL>

make a backup of each existing destination file

-b

like –backup but does not accept an argument

--force, -f

remove existing destination files

--interactive, -i

prompt whether to remove existing destination files

--no-dereference, -n

treat LINK_NAME as a normal file if it is a
symbolic link to a directory

--logical, -L

follow TARGETs that are symbolic links

--physical, -P

make hard links directly to symbolic links

--symbolic, -s

make symbolic links instead of hard links

--suffix=<SUFFIX>, -S <SUFFIX>

override the usual backup suffix

--target-directory=<DIRECTORY>, -t <DIRECTORY>

specify the DIRECTORY in which to create the links

--no-target-directory, -T

treat LINK_NAME as a normal file always

--relative, -r

create symbolic links relative to link location

--verbose, -v

print name of each linked file

Dans la 1ère forme, créer un lien vers CIBLE avec le nom NOM_LIEN. Dans la 2ème forme, créer un lien vers CIBLE dans le répertoire courant. Dans les 3ème et 4ème formes, créer des liens vers chaque CIBLE dans RÉPERTOIRE. Créer des liens physiques par défaut, des liens symboliques avec –symbolic. Par défaut, chaque destination (nom du nouveau lien) ne doit pas déjà exister. Lors de la création de liens physiques, chaque CIBLE doit exister. Les liens symboliques peuvent contenir du texte arbitraire ; s’ils sont résolus plus tard, un lien relatif est interprété en relation avec son répertoire parent.

Examples

Crée un lien symbolique vers un fichier ou un répertoire :

ln {{[-s|--symbolic]}} {{/chemin/vers/fichier_ou_repertoire}} {{chemin/vers/lien_symbolique}}

Modifie la cible d’un lien symbolique existant :

ln {{[-sf|--symbolic --force]}} {{/chemin/vers/nouveau_fichier}} {{chemin/vers/lien_symbolique}}

Crée un lien dur vers un fichier :

ln {{/chemin/vers/fichier}} {{chemin/vers/lien_dur}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.