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 [OPCIÓN]... [-T] DESTINO NOMBRE_ENLACE
ln [OPCIÓN]... DESTINO
ln [OPCIÓN]... DESTINO... DIRECTORIO
ln [OPCIÓN]... -t DIRECTORIO DESTINO...

Crear enlaces entre archivos.

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

En la 1a forma, crear un enlace a DESTINO con el nombre NOMBRE_ENLACE. En la 2a forma, crear un enlace a DESTINO en el directorio actual. En las 3a y 4a formas, crear enlaces a cada DESTINO en DIRECTORIO. Crear enlaces duros por defecto, enlaces simbólicos con –symbolic. Por defecto, cada destino (nombre del nuevo enlace) no debería existir ya. Al crear enlaces duros, cada DESTINO debe existir. Los enlaces simbólicos pueden contener texto arbitrario; si se resuelve posteriormente, un enlace relativo se interpreta en relación a su directorio padre.

Examples

Crea un enlace simbólico a un archivo o directorio:

ln {{[-s|--symbolic]}} {{/ruta/al/archivo_o_directorio}} {{ruta/al/enlace_simbólico}}

Sobrescribe un enlace simbólico existente para que apunte a un archivo distinto:

ln {{[-sf|--symbolic --force]}} {{/ruta/al/nuevo_archivo}} {{ruta/al/enlace_simbólico}}

Crea un enlace duro a un archivo:

ln {{/ruta/al/archivo}} {{ruta/al/enlace_duro}}

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.