cd
cd it244
cd ex
mkdir ex9
cd ex9
cd
pwd
ls -l
cd ~ghoffman
pwd
ls -l
cd ~/it244/ex/ex9
pwd
nano
to create the file name.txtnano name.txt
nano
.
ls -l name.txtYou have read and write permission on this file
cat name.txtYou have read permission so you can run
cat
on it.
nano
nano name.txtYou can only open the file if you have read permission.
nano
.
cat name.txtYou have write permission so you were able to change the file.
chmod 400 name.txt
ls -l name.txtYou are the only one who has any permissions on this file.
cat name.txt
nano
nano name.txt
nano
Control XWhen asked the following, press "N".
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
cat name.txtNothing has changed.
chmod 000 name.txt
ls -l name.txt
cat name.txtYou can't because you no longer have read permission.
nano
nano name.txtYou get an empty file because you do not have read permission now on the file
Control X
chmod 644 name.txt
ls -l name.txt
cat name.txtYou can now run
cat
on the file because you
have restored your read permission on the file.
chmod
with Numeric Argumentscd ~/it244/ex/ex9
pwd
touch test.txt
ls -l test.txt
chmod 600 test.txt
ls -l test.txt
chmod 666 test.txt
ls -l test.txt
chmod 644 test.txt
ls -l test.txt
rm test.txt
cd ~/it244/ex/ex9
pwd
nano ex9.sh
chmod
with Numeric Arguments.
bash ex9.sh > /dev/nullRunning ex9.sh this way will only print error messages.
~ghoffman/it244_test/ex09.shWhen the script asks if you are ready for more, hit Return or Enter.