Как сказать различие между “Никаким таким файлом или каталогом” и “Отклоненным Разрешением”

Для вторичных сервисов DNS я использую afraid.org и buddyns.com; оба освобождают.

3
задан 20 May 2014 в 23:28
2 ответа

Test the file instead.

test -e /etc/shadow && echo The file is there

test -f /etc/shadow && echo The file is a file

test -d /etc/shadow && echo Oops, that file is a directory

test -r /etc/shadow && echo I can read the file

test -w /etc/shadow && echo I can write the file

See the test man page for other possibilities.

8
ответ дан 3 December 2019 в 04:58
$ test -f /etc/passwd
$ echo $?
0

$ test -f /etc/passwds
$ echo $?
1
1
ответ дан 3 December 2019 в 04:58

Теги

Похожие вопросы