FILE PERMISSION

SOURCE CODE:
read i
if [ -x $i ]
then
echo “ i has execute permission ”
else
echo “ i does not have execute permission ”
fi
if [ -r $i ]
then
echo “ i has readable permission ”
else
echo “ i does not have readable permission ”
fi
if [ -w $i ]
then
echo “ i has writeable permission ”
else
echo “ i does not have writeable permission ”
fi

OUTPUT:
[examuser35@localhost Jebastin]$sh permission.sh
a
i has execute permission
i has readable permission
i has writeable permission
Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: