Bash if语句中的-s开关是什么?

Bash if语句中的-s开关是什么?,bash,Bash,在if语句中-s开关做什么?例如 if [ -s $File_name ]; then : else ... 那么-s开关检查的是什么情况呢?在shell中运行man[你会看到: -s FILE FILE exists and has a size greater than zero 男子测试说: 此标志测试位置为$file\u name的文件是否存在且不为空,大小是否大于0。根据和man test文档,它检查$file\u文件是否存在且大小是否超过0字节。m

在if语句中-s开关做什么?例如

if [ -s $File_name ]; then
   :
else
...
那么-s开关检查的是什么情况呢?

在shell中运行man[你会看到:

   -s FILE
          FILE exists and has a size greater than zero
男子测试说:


此标志测试位置为$file\u name的文件是否存在且不为空,大小是否大于0。

根据和man test文档,它检查$file\u文件是否存在且大小是否超过0字节。

man test或man查找信息。AIX中似乎没有手册页。在AIX上,这些手册页实际上非常完整。也许你还没有安装。谷歌有所有的手册页。
   -s FILE
          FILE exists and has a size greater than zero