So in consideration for some new and/or transfer students who may not
be entirely familiar with UNIX, I created this brief tutorial with some
common commands as well as some concepts that will help you get along.
If you have any other questions, you can send me an email at:
wreasor@ucsd.edu
| Command | Description | Example Usage |
|---|---|---|
| ls | Prints to contents of the current directory | mylogin% ls |
| pwd | Shows the current directory | mylogin% pwd |
| cp < arg1, arg2 > | Copy file in arg1 to path in arg2 | mylogin% foo.java ../foo2.java |
| rm < file to remove > | Removes the specified file | mylogin% rm ../projects/spam.txt |
| mkdir | Creates a directory to store data .. Same as a 'folder' in Windows | mylogin% mkdir mystuff |
| cd < path > | Changes working directory to specified path | mylogin% cd ../../morestuff |
Now we are going to apply some of the commands listed above. For this, let's refer to the diagram below which is a sample
representation of the file structure in a random account.
-------HOME-------
/ \
mystuff assignments--------
| | \
foo.txt ni.java P0
ni.class |
P0.java
P0.class
HOME
|---- mystuff
| |---- foo.txt
|
|---- assignments
|---- ni.java
| ni.class
|
|---- P0
|---- P0.java
P0.class
-------HOME-------
/ \
mystuff assignments--------
| | \
foo.txt ni.java P0
ni.class |
P0.java
-------HOME-------
/ \
mystuff assignments--------
| | \
foo.txt ni.java P0
ni.class |
P0.java P0.java
-------HOME-------
/ \
mystuff assignments--------
| | \
foo.txt ni.java P0
ni.class |
P0.java P1.java