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中查看ip地址的命令是什么

取消一件或多件处于scheduled或executing状态的模拟系统事件

Linux如何运行程序

操作系统--Linux的详细介绍

Linux找不到文件怎么办

Linux系统怎么退出vi

如何关闭Linux端口

Linux下如何删除乱码文件及目录

Linux系统下如何修改root密码

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



打赏

取消

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

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

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

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

评论

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