Bash File Testing

本文详细介绍了Linux中用于检查文件属性的常用命令及其用法,包括文件是否存在、是否为普通文件、目录、链接等特性。
-b filename  Block special file
-c filename  Special character file
-d directoryname  Check for directory existence
-e filename  Check for file existence
-f filename  Check for regular file existence not a directory
-G filename  Check if file exists and is owned by effective group ID.
-g filename  true if file exists and is set-group-id.
-k filename  Sticky bit
-L filename  Symbolic link
-O filename  True if file exists and is owned by the effective user id.
-r filename  Check if file is a readable
-S filename  Check if file is socket
-s filename  Check if file is nonzero size
-u filename  Check if file set-ser-id bit is set
-w filename  Check if file is writable
-x filename  Check if file is executable

转载于:https://www.cnblogs.com/greencolor/archive/2011/06/04/2072675.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值