shell 中相关判断参数意义
2011-05-16 11:47
573 查看
* -b file = True if the file exists and is block special file.
* -c file = True if the file exists and is character special file.
* -d file = True if the file exists and is a directory.
* -e file = True if the file exists.
* -f file = True if the file exists and is a regular file
* -g file = True if the file exists and the set-group-id bit is set.
* -k file = True if the files’ “sticky” bit is set.
* -L file = True if the file exists and is a symbolic link.
* -p file = True if the file exists and is a named pipe.
* -r file = True if the file exists and is readable.
* -s file = True if the file exists and its size is greater than zero.
* -s file = True if the file exists and is a socket.
* -t fd = True if the file descriptor is opened on a terminal.
* -u file = True if the file exists and its set-user-id bit is set.
* -w file = True if the file exists and is writable.
* -x file = True if the file exists and is executable.
* -O file = True if the file exists and is owned by the effective user id.
* -G file = True if the file exists and is owned by the effective group id.
* file1 -nt file2 = True if file1 is newer, by modification date, than file2.
* file1 ot file2 = True if file1 is older than file2.
* file1 ef file2 = True if file1 and file2 have the same device and inode numbers.
* -z string = True if the length of the string is 0.
* -n string = True if the length of the string is non-zero.
* string1 = string2 = True if the strings are equal.
* string1 != string2 = True if the strings are not equal.
* !expr = True if the expr evaluates to false.
* expr1 -a expr2 = True if both expr1 and expr2 are true.
* expr1 -o expr2 = True is either expr1 or expr2 is true.
* -c file = True if the file exists and is character special file.
* -d file = True if the file exists and is a directory.
* -e file = True if the file exists.
* -f file = True if the file exists and is a regular file
* -g file = True if the file exists and the set-group-id bit is set.
* -k file = True if the files’ “sticky” bit is set.
* -L file = True if the file exists and is a symbolic link.
* -p file = True if the file exists and is a named pipe.
* -r file = True if the file exists and is readable.
* -s file = True if the file exists and its size is greater than zero.
* -s file = True if the file exists and is a socket.
* -t fd = True if the file descriptor is opened on a terminal.
* -u file = True if the file exists and its set-user-id bit is set.
* -w file = True if the file exists and is writable.
* -x file = True if the file exists and is executable.
* -O file = True if the file exists and is owned by the effective user id.
* -G file = True if the file exists and is owned by the effective group id.
* file1 -nt file2 = True if file1 is newer, by modification date, than file2.
* file1 ot file2 = True if file1 is older than file2.
* file1 ef file2 = True if file1 and file2 have the same device and inode numbers.
* -z string = True if the length of the string is 0.
* -n string = True if the length of the string is non-zero.
* string1 = string2 = True if the strings are equal.
* string1 != string2 = True if the strings are not equal.
* !expr = True if the expr evaluates to false.
* expr1 -a expr2 = True if both expr1 and expr2 are true.
* expr1 -o expr2 = True is either expr1 or expr2 is true.
相关文章推荐
- shell脚本判断输入参数个数
- shell脚本之判断输入参数是否为整数值的实例
- Tip:判断条件与数据库相关时,需要注意什么。要尊重字段原本的意义
- shell判断输入的参数是不是数字
- shell脚本接收参数并判断是否为空
- Shell脚本中判断输入变量或者参数是否为空的方法
- shell if语句之判断参数
- 对shell中常见参数及判断命令介绍
- Linux下shell脚本判断文件相关属性
- shell脚本--获取程序进程相关性能参数
- shell 条件判断参数
- Shell文件相关常用命令及参数总结
- Shell脚本中判断输入参数个数的方法
- 学习 shell —— 条件判断 if 的参数
- shell中的条件判断、参数以及变量替换
- shell脚本中if的相关参数
- shell 编程中使用到得if语句内判断参数
- Linux下Shell中if的相关参数
- linux使用shell脚本创建多分支判断使用function传递参数
- shell(2):shell中关于if,while,输入参数,函数,c++进程等相关知识应用汇集事例