linux找不到文件怎么办


当前第2页 返回上一页

source 命令找filename是在当前的shell环境下找的,如果没有反斜线,就在path中找,如果没有就没有。

1

2

3

4

5

6

7

8

source filename [arguments]

              Read  and  execute commands from filename in the current shell environment and return the exit status of the last command exe-

              cuted from filename.  If filename does not contain a slash, file names in PATH are used to find the directory containing file-

              name.   The  file  searched  for  in  PATH  need  not be executable.  When bash is not in posix mode, the current directory is

              searched if no file is found in PATH.  If the sourcepath option to the shopt builtin command is turned off, the  PATH  is  not

              searched.   If  any  arguments  are  supplied, they become the positional parameters when filename is executed.  Otherwise the

              positional parameters are unchanged.  The return status is the status of the last command exited within the script  (0  if  no

              commands are executed), and false if filename is not found or cannot be read.

如下方式都可以:

1、将脚本所在的目录加到PATH中

2、加上相对路径或绝对路径

3、就算是当前目录也得加./

推荐:《Linux教程

以上就是linux找不到文件怎么办的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

Linux如何解压文件

如何在Linux实例上搭建magento电子商务网站

Linux中的复制粘贴命令是什么

Linux怎么开启和关闭防火墙

Linux 中 whereis 命令怎么用?

在云服务器 ecs上如何删除一份自定义镜像

Linux如何查看cpu

Linux操作系统如何在ecs上搭建docker

如何查看Linux系统是多少位的

Linux中如何查看mysql服务是否启动

更多相关阅读请进入《Linux》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...