Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash directorry permision if

# Check if variable is a directory with read and execute bits set.
dir_name=/tmp/bar
mkdir -m 555 "$dir_name"
if [[ -d "$dir_name" ]] && [[ -r "$dir_name" ]] && [[ -x "$dir_name" ]]; then
    : # do something with the directory
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #directorry #permision
ADD COMMENT
Topic
Name
7+6 =