CS 4950 Spring 2017
Find a computer and log into the
OSX side using your CS login name and password.
Open Firefox and find the class web
Open TextWrangler - use the finder
window and go to applications.
Open a new text file, called Lab4.txt, to record your work today -
you will paste in some of your command lines. The header of the file
should look like:
February 22, 2017
Find the Terminal - use the finder
window and go to applications and then utilities.
How to change your shell to
bash and create .bash_profile
Here is a way that users can change their terminal to bash:
Then you have to enter your user password and open a new terminal
window to see the changes.
How-to create a bash_profile:
Start up Terminal
Type "cd ~/"
to go to your home folder
.bash_profile" to create your new file.
Edit .bash_profile with nano, pico, or TextWrangler.
~/.bash_profile" to reload .bash_profile and update any
functions you add.
New from chapter 6:
Write a script: the goal is to create and run the script on
page 89 to list the directory contents.
Create an alias: this will allow you to use a shortcut for
long commands - see page 99
- First you will need to create a scripts directory
- Next edit your path to include that directory
- Now write the script and save it to your scripts directory as
- Check that the file has execute permissions
- Finally test it on some directories
Copying file in bulk: work through the example starting on
- Create an alias to get to your sandbox directory from the
- Test it in the terminal
- Once you are satisfied it works add it to your .bash_profile
- Open a new shell and test it again.
to retrieve literature references: if you have time work
through example starting on page 97
Turn it in:
Go to the CS Homework Submission System: https://www.cs.csustan.edu/cshomework/
Choose: instructor Martin
Upload the your Lab4.txt file as prompted.