cd
cd it244
cd ex
mkdir ex8
cd ex8
cd
pwd
ls -aThese files configure various settings in your Unix environment.
cd /home/ghoffman
ls -a
cat .bash_profileThis file runs other files that customize my Unix environment.
cat .profile.d/local/local_profile.shWhat you see here will not mean much to you now.
cd /home/ghoffman/course_files/it244_filesYou can use this pathname anywhere in the filesystem and will always refer to the same directory.
pwdNotice that
pwd
always returns the absolute pathname of your current directory.
cd /home/ghoffman
pwd
cd ~
pwdYou should be in /home/YOUR_UNIX_ID
cd ~ghoffman
pwdYou should be in /home/ghoffman
cd ~/it244
pwdYou should be in /home/YOUR_UNIX_ID/it244.
cd ~/it244/ex/ex8
ls -aNotice that you have a . and a ..entry.
touch foo.txt
mkdir test
cd test
pwd
ls ..
cp ../foo.txt .You use . to specify the current directory and .. to specify the parent directory.
ls
pwd
rm *
cd ..
rmdir test
cd ~ghoffman/course_files/it244_files
pwd
ls
cat fruit.txtSince fruit.txt is in your new current directory, its pathname is simply the filename.
ls
ls dir1
ls dir1/dir2
cat dir1/dir2/foo.txt
cd dir1/dir2
pwd
ls ../../
ls ../../../../../..
ls ../../../..
ls ../../../../public_html/it244_html/class_notes_it244
tail ../../../../public_html/it244_html/class_notes_it244/class_notes_index_it244.html
cd ~/it244/ex/ex8
pwd
nano ex8.sh
bash ex8.sh > /dev/nullRunning ex8.sh this way will only print error messages.
~ghoffman/it244_test/ex08.shWhen the script asks if you are ready for more, hit Return or Enter.