linux
鹿灏楷silves
不要人夸颜色好,只留清气满乾坤
展开
-
linux中脚本执行命令简化
编写脚本之后执行,需要使用相对路径或者绝对路径执行文件,此时有两种方法执行脚本,还可以简化命令 不推荐 将脚本放到系统命令中 cp ./hello.sh /bin/ 也就是将脚本放到/bin/目录下,输入脚本文件名,直接执行脚本文件 设置环境变量,将脚本的文件目录直接添加到环境变量 PATH="$PATH":/root #:后接所在目录,此时,直接输入文件名即可执行脚本 ...原创 2020-07-16 21:34:41 · 3162 阅读 · 0 评论 -
linux中:this link cannot be used because its target doesn‘t exist
在linux中,有时需要两个文件的硬链接,使用ln -s命令 ln -s ./test.php /urs/test.php.hard 此时,再打开硬链接生成的文件,显示 this link cannot be used because its target doesn’t exist, 问题在于源文件的目录没有写清楚,应该使用绝对路径 ln -s /home/silves/test.php /urs/test.php.hard 此时,再打开硬链接生成的文件,则不会报错 ...原创 2020-07-05 22:17:31 · 4674 阅读 · 0 评论