ln -- make links between files


ln is as specified in the SUS but with differences as listed below.


-b, --backup[=CONTROL]

makes a backup of each existing destination file.

-n, --no-dereference

treats destination that is a symlink to a directory as if it were a normal file.

-i, --interactive

prompts whether to remove destinations.

-s, --symbolic

makes symbolic links instead of hard links.

-S, --suffix=SUFFIX

overrides the usual backup suffix.


moves all SOURCE arguments into directory DIR.

-v, --verbose

prints name of each file before linking.


outputs version information and exits.


The backup suffix is ~, unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values:

none, off

never makes backups (even if --backup is given).

numbered, t

makes numbered backups.

existing, nil

numbered if numbered backups exist, simple otherwise

simple, never

always makes simple backups.