Linux Command ln, linux Command ln
Soft connection: generate an image of a file at the selected location without occupying disk space. A non-existing file name can be connected across file systems. Similar to windows shortcuts.
Hard link: select a location to generate a file of the same size as the source file. Cross-file system is not supported. Normal users cannot create hard links for directories.
Regardless of the soft connection, the file synchronization is maintained. No matter where the file is changed, other files will change in the same way;
Ln Command Format
Ln [OPTIONS] SOURCE DIST
Parameter description
SOURCE: original file DIST: the format of the generated connection file OPTIONS is [-bdfinsvF] [-S backup-suffix] [-V {numbered, existing, simple}] [-- help] [-- version]-B Delete, overwrite the previously established connection-d allow the superuser to create a hard link to the directory-f Force Execution-I interaction mode, if the file exists, the system prompts the user whether to overwrite-n and regards the conforming link as a general directory-s soft connection (symbolic link) -v shows the detailed handling process-S "backup-suffix" adds the backup files to the end of "backup-suffix"-v method specifies the backup mode -- help display auxiliary instructions -- version show version informationExample:
Generate a soft connection zzln-s yy zz for file yy and generate a hard link zzln yy zz for file yy.