linux命令ln介绍(11)

ln命令主要用于建立连接、软连接or硬连接。
参数:

-L, --logical:建立一个硬连接
-s, --symbolic:建立一个软连接(符号连接)
-d, -F, --directory:允许root建立文件夹硬连接,不过由于系统限制一般不允许
-f, --force:删除现有目标文件
-i, --interactive:提示用户是否删除目标文件 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

其他参数:文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-n, --no-dereference
note:treat destination that is a symlink to a directory as if it were a normal file文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

--backup[=CONTROL]
note:make a backup of each existing destination file文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-b:like --backup but does not accept an argument文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-S, --suffix=SUFFIX
note:override the usual backup suffix文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-t, --target-directory=DIRECTORY
note:specify the DIRECTORY in which to create the links文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-T, --no-target-directory
note:treat LINK_NAME as a normal file文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

-v, --verbose
note:print name of each linked file 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

案例:

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/rebuilding/ln-command-description/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
January
7
 
Byrd
  • by Published onJanuary 7, 2018
  • 原文链接:https://note.t4x.org/rebuilding/ln-command-description/
匿名

Comment

Anonymous

Slide puzzle verification.