Basic Terminal Commands
There are many commands which are most commonly used for both the terminal and the KU Cluster. Commonly used commands are shown below; however, many more commands can be found within the KU Cluster Wiki.
Editing Files
To edit files, you can use either vi, emacs, or VSCode. It is recommended to either use vim (vi) or emacs unless you are familiar with VSCode.
Using VSCode as a visual guide when navigating the cluster can be extremely helpful. You can download files without typing the entire command, edit files with added navigation and debugging assistance, as well as quickly access files to edit. Steps to implement VSCode for ssh use can be found here.
Copying and Removing
To copy or remove files/directories, cp and rm are used.
cp path/to/original path/to/copywill copy a file to a new path. The path to the copy is required (if you are copying to the same directory, you can simply just type the name of the new copied file instead).cp -R path/to/original/ path/to/copy/will copy a directory to a new path. Similarly to the generalcpcommand, a new location or name must be specified.mv path/to/file path/to/destinationmoves the file of interest without copying its contents.rm path/to/fileremoves a single file. This cannot be undone. Once files are removed, the action is permanent.rm -rf path/to/fileremoves a directory and its included contents.
Other Helpful Commands
du -sh path/to/directory/displays the amount of memory associated to a directory.scp KUID@login1.hpc.crc.ku.edu:path/to/file path/to/destinationwill download a file from the Cluster to your computer (where KUID is your KU Username). It is important tocdto the location you want the file to be downloaded to prior to downloading it from the Cluster itself.scp -r KUID@login1.hpc.crc.ku.edu:path/to/file path/to/destinationwill download a directory and its contents (including subdirectories and their associated files).
stat path/to/filedisplays information including the size, creation date, and modify date for a file.