Basic Unix commands


pwd    
ls    
mkdir blah    
cd blah    
cd -    
cd ..    
cd    
rm blah    
rm -r blah    
cp blah blah2    
mv blah blah2    
mv blah mydir    
python    
python blah.py    
# "Print working directory"; print your current location
# List the files in the current directory
# Make a directory named "blah"
# Change directory to a directory named "blah"
# Change directory the previous directory
# Go up one level
# Change directory to the home directory (where you start out when you open the terminal)
# Remove a file named "blah"
# Remove a directory named "blah"
# Copies a file named "blah" to a new file named "blah2"
# Changes the name of "blah" to "blah2"
# Moves the file "blah" to the directory "mydir"
# Starts the Python interpreter
# Runs the Python script "blah.py"


If you are unsure about how to use any of these commands, once you are in your Unix terminal type "man command" to see the "man page" for that command. For example, "man ls" would bring up the man page for the command ls. Almost all programs in Unix, no matter how simple or complex, have man pages.



Back