首页 > 系统相关 >Linux shell command ln All In One

Linux shell command ln All In One

时间:2023-06-04 21:34:30浏览次数:53  
标签:shell TARGET links ln symbolic -- command link

Linux shell command ln All In One

硬连接 vs 软连接

ln

$ man ln > ./man-docs/ln.md
$ cat ./man-docs/ln.md
LN(1)                                             User Commands                                            LN(1)

NAME
       ln - make links between files

SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME
       ln [OPTION]... TARGET
       ln [OPTION]... TARGET... DIRECTORY
       ln [OPTION]... -t DIRECTORY TARGET...

DESCRIPTION
       In the 1st form, create a link to TARGET with the name LINK_NAME.  In the 2nd form, create a link to TAR‐
       GET in the current directory.  In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.   Cre‐
       ate  hard  links  by  default, symbolic links with --symbolic.  By default, each destination (name of new
       link) should not already exist.  When creating hard links, each TARGET must exist.   Symbolic  links  can
       hold  arbitrary  text; if later resolved, a relative link is interpreted in relation to its parent direc‐
       tory.

       Mandatory arguments to long options are mandatory for short options too.

       --backup[=CONTROL]
              make a backup of each existing destination file

       -b     like --backup but does not accept an argument

       -d, -F, --directory
              allow the superuser to attempt to hard link directories (note: will probably fail  due  to  system
              restrictions, even for the superuser)

       -f, --force
              remove existing destination files

       -i, --interactive
              prompt whether to remove destinations

       -L, --logical
              dereference TARGETs that are symbolic links

       -n, --no-dereference
              treat LINK_NAME as a normal file if it is a symbolic link to a directory

       -P, --physical
              make hard links directly to symbolic links

       -r, --relative
              create symbolic links relative to link location

       -s, --symbolic
              make symbolic links instead of hard links

       -S, --suffix=SUFFIX
              override the usual backup suffix

       -t, --target-directory=DIRECTORY
              specify the DIRECTORY in which to create the links

       -T, --no-target-directory
              treat LINK_NAME as a normal file always

       -v, --verbose
              print name of each linked file

       --help display this help and exit

       --version
              output version information and exit

       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 make backups (even if --backup is given)

       numbered, t
              make numbered backups

       existing, nil
              numbered if numbered backups exist, simple otherwise

       simple, never
              always make simple backups

       Using  -s  ignores  -L and -P.  Otherwise, the last option specified controls behavior when a TARGET is a
       symbolic link, defaulting to -P.

AUTHOR
       Written by Mike Parker and David MacKenzie.

REPORTING BUGS
       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
       Report any translation bugs to <https://translationproject.org/team/>

COPYRIGHT
       Copyright  ©  2020  Free  Software  Foundation,  Inc.   License  GPLv3+:  GNU  GPL  version  3  or  later
       <https://gnu.org/licenses/gpl.html>.
       This  is  free software: you are free to change and redistribute it.  There is NO WARRANTY, to the extent
       permitted by law.

SEE ALSO
       link(2), symlink(2)

       Full documentation <https://www.gnu.org/software/coreutils/ln>
       or available locally via: info '(coreutils) ln invocation'

GNU coreutils 8.32                               September 2020                                            LN(1)


demos

(

标签:shell,TARGET,links,ln,symbolic,--,command,link
From: https://www.cnblogs.com/xgqfrms/p/17456385.html

相关文章

  • Linux shell command cut All In One
    LinuxshellcommandcutAllInOnecut截取指定符号等号后面的字符串cut截取等号后面的字符串#获取env$env#获取登录当前用户信息$env|grepUSER$env|grepUSER|cut-d"="-f2#获取登录当前用户信息$whomai$echo$USERdemos#!/usr/bin/env......
  • window系统的power shell 和 Linux Ubuntu 的命令行各自特点和优缺点
    PowerShell是Windows系统自带的命令行工具,而LinuxUbuntu的命令行则是Linux系统的标准命令行工具。它们的特点和优缺点如下:PowerShell特点和优缺点:特点:1.支持对象管道,可以将命令的输出作为对象进行处理,方便进行脚本编写和自动化处理。2.内置了许多Windows系统和.......
  • Raspberry Pi command line tools vcgencmd All In One
    RaspberryPicommandlinetoolsvcgencmdAllInOnevcgencmd$vcgencmd-h$vcgencmd--helpUsage:vcgencmd[-t]commandSendacommandtotheVideoCoreandprinttheresult.-tTimehowlongthecommandtakestocomplete-h,--helpShowt......
  • Linux常用的shell命令
    shell linux命令行就是由shell提供的,shell其实是所有命令行程序的统称,而CentOS系统中默认使用的shell程序就是bash,他是linux系统中运行的一种特殊程序,其文件位于/bin/bash,用户在登录linux系统时,系统就会自动加载一个shell程序,在用户和内核之间充当“翻译官”。 这里要跟shel......
  • Vulnhub: HA: ISRO靶机
    kali:192.168.111.111靶机:192.168.111.134信息收集端口扫描nmap-A-sC-v-sV-T5-p---script=http-enum192.168.111.134目录爆破,发现存在connect.phpferoxbuster-k-d1--urlhttp://192.168.111.134-w/opt/zidian/SecLists-2022.2/Discovery/Web-Content/directo......
  • Debian11安装GNOME-TWEAKS报错WARNING : Shell not installed or running
    先写结论:打开方式是按下Alt+F2弹出命令窗输入gnome-tweaks,就会弹出优化界面,点击扩展就可以按需开启扩展插件。还有一种方法,如果你在安装debian11系统时安装完了GNOME,那么你可以在显示应用程序内找到一个叫工具的软件合集,内有名叫优化的程序。闲聊:不过其实一开始我就注意到了有这......
  • centos7 dotnet command not found
    官方文档:https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/installubuntu,generic内核,安装失败解决方案:如果提示:-bash:donet:commandnotfound则执行命令试试:ln-s/usr/share/dotnet/dotnet/usr/bin/dotnet第一步:sudorpm-Uvhhttps://packages.microsoft.c......
  • [How To] Open Dos Prompt Command Here in Windows 7, and more
    Ifyoulikethepowertoy“OpenCommandPromptHere”inWindowsXP,youwillprettymuchlovethenewcontextmenu“OpenCommandWindowhere”inWindows7.Readon,moretipsatthebottom.Whatisit?It’saright-clickcontextmenuthatopensacommandp......
  • Shell(Linux)手册-awk
    资料来源awk知识点总结|骏马金龙精通awk系列|骏马金龙linuxawk命令使用详解|元宇宙-MetaverseLinuxawk命令|runoob基础知识格式化文本文件,对文本文件进行更复杂的加工处理、分析Awk自动地搜索输入文件,并把每一个输入行切分成字段。许多工作都是自动完成的,例如......
  • shell遍历当前目录下的文件,用去掉文件后缀的字符串替换文件中的文本
    今天写了一个shell,遍历当前目录下的文件,用每个文件的文件名去掉后缀的字符串替换文件中的一段字符串。 脚本如下:#!/bin/bashfile=`ls*.html`;echo$fileforitemin$filedofilename=${item%.*}echo$filenamesed-i"s/search('channel')/search('${fi......