All material in this course will assume the bash shell. This seems to be the default on a cygwin install. It does not seem to be the default on the instructional Linux boxes.To determine your default shell:
$ grep yourloginname /etc/passwdThe shell will be at the end of the line of nonsense (e.g., /bin/bash). If it is not the bash shell:
- Type which bash to find the absolute path name of the bash shell.
- Use the chsh command to change your login shell to bash.
- Because it takes a while for that to take effect, invoke bash explicitly typing its full path name as a command (e.g., /bin/bash).
Do this, but don't hand anything in about it. Listed below are a set of commands to execute. Type them, see what happens, and try to make sure you understand what they do. (Some additional commands/reading may be required for that.)You can do this on any Unix machine, or with cygwin (unless you've failed to install something needed).
If you see the following notation: Ctrl+X; on a line, hold down the control key and press the letter specified. Ctrl+X, for example, specifies the cut operation in Windows. Don't hold down the shift key to make the letter uppercase.
- man
- man man
No need to read this page in detail at this point.
- man less
man uses less to display pages.
- less /usr/include/stdio.h
Now find the defintion of "putc".- cat /usr/include/stdio.h
- cat /usr/include/stdio.h | less
- pwd
- ls
- ls -al
- mkdir HW0
- cd hw0
- cd HW0
- pwd
- ls -al
- ls -al ..
- cp /usr/include/stdio.h testfile
- ls -al; ls -l
- mv testfile test
- ls -l test
- ls -l te[now hit a tab]
- cp test test2
- ls -l te[now hit 3 tabs]
- rm test2; ls
- pushd /etc
- pwd
- popd; pwd
- ls ~
- cd ..
- mkdir HW0prime
- cd HW0prime
- ln -s ~/HW0/test linkedTest
- less linkedTest
- ls -l
- rm ../HW0/test
- less linkedTest
- ls -l
- rm linkedTest
- ls >files
- less files
- ls >files
- less files
- ls >>files
- less files
- cat files > /dev/null
- cat files >> files
- cat files >> files2
- cat files >> files2
- cat files2
- cd ../HW0
- history
- man history
[read description]- cp /usr/include/stdio.h testfile
- ls
- rm testfile
- [up arrow 3 times]
- [up arrow twice]
- !cp
- ls
- !!
- Ctrl+Rrm
- Ctrl+Rcp
- ^testfile^copyfile
- ls
- Ctrl+P
- rm testfileCtrl+Urm copyfile
- man grep
- grep putc testfile
- grep -w putc testfile
- wc testfile
- grep -w putc testfile | wc
- sleep 1
- sleep 20[hit enter, then Ctrl+C]
- sleep 240 &
- jobs
- kill %1
- jobs
- sleep 240 [hit enter, then Ctrl+Z]
- jobs
- bg
- jobs
- fg [hit enter, then Ctrl+C]
- jobs