-c FILE (conditional operator)

true if the file exists and is a character special file. Such a file is also known as “character device”.

Examples

Different ways to test if a file is a character special file:
1
2
3
4
test -c /dev/char/10:1 && echo "character device"
[ -c /dev/char/10:1 ] && echo "character device"
# Bash
[[ -c /dev/char/10:1 ]] && echo "character device"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -cprobieren Sie es aus!
© 2020–2024 Joachim Ansorg
Impressum
Datenschutz
Rechtliches