xpt*_*xpt 6 linux command-line ubuntu command-line-arguments
请看一下下面的代码,
snap=snapshot.file
touch snapshot.file-1
$ [ -a $snap-1 ] && echo yes
yes
Run Code Online (Sandbox Code Playgroud)
test -a该命令在这里测试 什么?
我尝试info coreutils 'test invocation'并搜索-a,但没有在文件特征测试部分找到它,而是在测试连接词部分找到它。
test -a这样的命令是一个未记录的命令吗?
注意,我的系统是 Ubuntu 13.10,我的man test系统是GNU coreutils 8.20 October 2012 TEST(1)。
我不确定为什么该info页面没有它,但运行help test给出bash了答案:
...
File operators:
-a FILE True if file exists.
...
Run Code Online (Sandbox Code Playgroud)
所以这只是一个“存在”测试,没有检查其他权限/属性。
| 归档时间: |
|
| 查看次数: |
15881 次 |
| 最近记录: |