In Unix, you can check if a certain directory exists or not using -d
Eg:
if [-d $directory_name]
then
execute_some_commands
fi
In the variable $directory_name you specify the name of the directory. If the directory exists, then the if loop executes and the commands would be executed.
Eg:
if [-d $directory_name]
then
execute_some_commands
fi
In the variable $directory_name you specify the name of the directory. If the directory exists, then the if loop executes and the commands would be executed.
No comments:
Post a Comment