Overview
This page describes the filesystem structure on the SCC as well as commands for basic navigation and file manipulation on the system. We also have a Getting Started Reference Sheet (PDF) which we recommend you print out, look over, and keep available as a reference. This has a variety of information that will likely be useful to all new SCC users, whether experienced with Linux or not. More detailed information about the cluster is available on our System Usage page.
Filesystem Structure
The Linux filesystem starts at the “root” (/) and extends forward into directories that can contain both subdirectories and files. A series of decending directories can be strung together separated by slash characters (“/”) to indicate a location on the filesystem. This string of folders is called a “path” and will look like /project/projectname/subfolder/file. This structure is much like that on other common operating systems. More detailed information about the filesystem on the SCC can be found here, but an overview of the most common locations is detailed below.
| Location | Description |
/usr#/university_status/username |
Each user has a “home directory,” this is the directory you are put in when you first log in each session. |
/project/projectname |
Backed up Project Disk Space is backed up to another location each night. |
/projectnb/projectname |
Not backed up (“nb”) Project Disk Space. |
/project/ and /projectnb/ shares are located in /restricted/project/project_name/ and /restricted/projectnb/project_name/.Working with Files/Directories
Below are some simple examples of basic Linux commands for accessing and changing your files and directories. For all of these commands, you can run man command_name to see the manual page (system documentation) on the command, including explanation of available command line options.
- Show the current “full path”, the directory you are in with its parent and all levels of grandparents up to the root directory (/):
scc1% pwd /usr2/collab/adftest2 - Create a file:
scc1% touch myfileThis command will create a blank file namedmyfile. You will also want to be able to use an editor to create or modify an existing text file. A simple graphical editor to use isgedit, but more complex editors likeemacsandviare also available. - Create a new directory:
scc1% mkdir newdir - List the files, including other directories, in the current directory:
scc1% ls newdir newdirThere are many options to the
lscommand such asls -lto list the files in the current directory in “long” (verbose) format such as:scc1% ls -l newdir total 0 drwxr-xr-x 3 adftest2 adftest 512 Oct 28 16:03 newdirThe letters on the left (“drwxr-xr-x”) indicate the “permissions” of this file/directory. The “d” indicates that it is a directory. The next 9 characters indicate that is is “readable”, “writable”, and “executable” by you and “readable” and “executable” by both the members of your project group and the world. The commands you can use to change these “permissions” are chmod and umask.
- Move and/or rename a File
scc1% mv myfile newdir/newfilenameThis command will move the file
myfileinto the directorynewdirand simultaneously rename it to be callednewfilename. - Move to a different directory:
scc1% cd newdirMove to the newly created
newdirdirectory. You can also specify a “full path” (a path that starts with a /) such ascd /usr/local/bin. Typing justcd(orcd .) by itself will always take you to your home directory. - Copy a file
scc1% cp newfilename filecopyThis command will make a copy of
newfilenamein the filefilecopy. You can copy entire directories by using the-r(recursive) option. - Delete a file
scc1% rm filecopy rm: remove regular empty file `filecopy'? yBy default you will be asked to confirm that you want to remove a file by typing y when asked. You could avoid this by using the command line option
-fbut then you must be much more careful. Empty directories are removed using the commandrmdir directory_name. Full directories can be removed by again using the-r(recursive) option torm.
