Answers for "LINUX TEST FOLDER EXITS"

0

LINUX TEST FOLDER EXITS

You can use test -d (see man test).

-d file True if file exists and is a directory.

For example:

test -d "/etc" && echo Exists || echo Does not exist
Posted by: Guest on March-28-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language