more *.java will list the contents of all files
ending with .java in the current directory. You can even use just "*" which will match all files in
the current directory.
cd subdirName. To move up to the parent directory type
cd .. (that's cd followed by a space followed by two dots with no intervening space).
ssh username@unix.ic.ucsc.edu" (where
username is your username), then enter your password when prompted. These are the
same ones you used to login to the lab machine.
>". Type "chsh".
/usr/bin/bash.
The result will not take effect in Consoles or Terminals that are already open, and it may take a few hours before new Consoles or Terminals are created with your new setting. In these cases, you can always invoke bash directly, just type "bash". In any case, when you come to lab next time, you should find that the arrow keys allow you to navigate the command history and edit the current command (we'll explore these features in a minute).
To see what shell you are running, log into a new machine open a new Terminal or Console and type
ps. This will show you a list of processes running under your username. If you see
csh listed (as opposed to bash or tcsh), the new shell has
not yet taken effect.
Note: Some of you may already have some experience with UNIX and prefer a different shell environemnt (tcsh, for example). If you want to use that instead of bash, that's fine, but please keep in mind that when answering questions and providing examples, we will be assuming you are using bash.
cd /afs/cats/courses/cmps012a-cm/b but DO NOT hit the return key, instead hit the tab key.
Notice how bash is able to complete the filename for you (there is only one way to finish).
cd c and the tab key. Notice that this time
your computer will beep after partially completing the filename. There are multiple ways to continue. You can push tab again
to see a list of completions or type some more characters if you know what you want next.
cd").
ls -R > lab1mkdir.txt" which will put a listing of your directories into "lab1mkdir.txt".
(You may get some error message about OldFiles which you can ignore.)
You can see what is in
the file by typing "more lab1mkdir.txt". The ">" in the command means, instead of sending the output to the console so you can
read it, "redirect" the output into the file that comes next - in this case "lab1mkdir.txt".
/afs/cats/courses/cmps012a-cm/book-examples/chap2
contain the word "height". You might want to use cd to first get into the chap2 directory.
sftp username@unix.ic.ucsc.edu" to connect.
get filename"
to download the file from the
remote computer to the one your are working at (the lab computer or your home computer). The file will be put in whatever
directory you were in when you started sftp.
put filename" to upload a file from your computer to the remote computer (unix.ic).
quit".