#!/bin/csh -f # Test script - showing how 'chmod' changes file permissions # echo " "; echo "The default 'umask' setting is:" `umask`; echo " " # if ( -e testfile ) then echo "Previous file 'testfile' exists - removing it" /bin/rm testfile else echo "File 'testfile' does not exist" endif echo " " echo "Creating 'testfile' via the 'touch' command" touch testfile ls -al testfile echo " " # echo "Changing file permissions to '000':" chmod 000 testfile ls -al testfile echo " " # echo "Changing file permissions to 'u+r':" chmod u+r testfile ls -al testfile echo " " # echo "Changing file permissions to '740':" chmod 740 testfile ls -al testfile echo " " # echo "Changing file permissions to 'g-wx':" chmod g-wx testfile ls -al testfile echo " " # echo "Changing file permissions to '777':" chmod 777 testfile ls -al testfile echo " " # echo "Changing file permissions to '700':" chmod 700 testfile ls -al testfile exit