-b FILE (conditional operator)
true
if the file is a block special file.
Such a file is also known as “block device”.
Links
Examples
- Different ways to test if a file is a block special file:
1 2 3 4
test -b /dev/sda && echo "block device" [ -b /dev/sda ] && echo "block device" # Bash [[ -b /dev/sda ]] && echo "block device"
BashSupport Pro is a Bash IDE with support for -b – try it now!