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 »

Still not found what you are looking for? Try again here.