Unix Commands
Some useful Unix commands to know when using the workspace are:
dir
To show the content of the current directory you can use dir. To be able to see more information about the files and directories you might want to use the ls command with the ‘-la’ option. For example:
cd
Each Unix user has their own directory. Similar to “my documents” in windows. CD allows you to change the current directory. For example, to go to the scratch folder type:
cd scratch
If you would like to go back to your home directory you can use
cd ~/
cp
Copies a file. For example, to copy “file.txt” to my home directory:
cp file.txt ~/
rm
Removes files. For example, to remove the file “file.txt”:
rm file.txt
You can also use it to remove directories in a recursive way but be careful using this option. Unix does not have a “recycling bin” if you use this option and your files will be gone. For example to re move the directory “test_dir” you can use
rm -r test_dir
mkdir
Make a directory. For example, to create the directory “test_dir” you can use:
mkdir test_dir
man
Get the help for a command. For example, if you would like to know more about the options of “rm” you can type:
man rm
Once you are in the “man” pages you can exit by pressing “q”, move forward a screen by the space bar or a line by pressing “enter”.




