linux命令ln介绍(11)

    Read

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

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

其他参数:SourceByrd's Weblog-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 fileSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

--backup[=CONTROL]
note:make a backup of each existing destination fileSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

-b:like --backup but does not accept an argumentSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

-S, --suffix=SUFFIX
note:override the usual backup suffixSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

-t, --target-directory=DIRECTORY
note:specify the DIRECTORY in which to create the linksSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

-T, --no-target-directory
note:treat LINK_NAME as a normal fileSourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

-v, --verbose
note:print name of each linked file SourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/

案例:

SourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/ SourceByrd's Weblog-https://note.t4x.org/rebuilding/ln-command-description/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on January 7, 2018
  • 原文链接:https://note.t4x.org/rebuilding/ln-command-description/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: