ln命令使用

编程

做 laravel 项目部署的时候用到软链接

使用 Artisan 命令 storage:link 来创建符号链接:

php artisan storage:link

 需要将 verdor 里面的依赖创建同样的  符号链接。(如下图 storage 那样的红色箭头,非 蓝色 的箭头)

可以使用  ln -st /target  /destination

 

ps:

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

 

以上是 ln命令使用 的全部内容, 来源链接: utcz.com/z/517763.html

回到顶部