Regardless of the operating system of your personal computer you will need to know some basic Unix Shell commands since the HPC are Linux machines. If you do not have any experiencing using Unix Shell we would advise going at least the first (3 parts) of the Software Carpentry Unix Shell lessons.
|Examples of use
|Lists the files in your current directory.
|Lists the files in the specified directory.
|Lists all files, including hidden ones (-a), in long format (-l), in reverse order (-r) of time since edited (t) (meaning that the newest file is at the bottom of the page.
|Prints the path of your current working directory.
|Changes your current directory to the specified directory.
|Created an empty file of specified name.
|Opens the nano text editor.
|Opens the specified file in the nano text editor.
|Prints the top 10 lines of the specified file.
|head -n 2 file.txt
|Prints the top n lines of the specified file (in this case 2).
|Prints the bottom 10 lines of the specified file.
|tail -n 2 file.txt
|Prints the bottom n lines of the specified file (in this case 2).
|mv file.txt newname.txt
|rename the file.
|mv file.txt /path/to/destination/
|Move the file to the specified directory.
|mv -r directory/ /path/to/destination/
|Recursively move the directory and all contained files and directories to the specified path.
|cp file.txt /path/to/destination/
|Make a copy of the file in the specified directory.
|cp file.txt /path/to/destination/newname.txt
|Make a copy of the file in the specified directory with the specified name.
|cp -r directory/ /path/to/destination/
|Recursively copy all files and directories of a directory to the specified location.
|Delete the specified file.
|rm -r directory/
|Recursively delete the files and directories of the specified directory.
|Create a directory of the specified name.
|Bring up the manual of a command (in this case ls).
Pressing the 'tab' key once will automatically complete the line if it is the only option. e.g.
If there are more than one possible completions, pressing tab again will show all those options.
Use of the tab key can help navigate the filesystem, spellcheck your commands and save you time typing.