Using the scratch disks
Making space for the first time
- Although you could simply copy one or more files to a scratch disk with the Linux cp command, it's better to first create your own folder into which you can copy these - it's neater, it keeps all yuor files and sub-folders in one place and makes it easier to move them elsewhere or to make a tar or zip archive of your folder using just one command. Also, it's recommended you name the folder with your own username since this makes it easier to see whose it is at a glance; if you want to create multiple folders in the top level of a scratch disk, your username followed by some suffix of your own choosing might be a good idea. The command:
will create a folder called jbloggs on the scratchcomp07 scratch disk owned by yourself. It's as simple as that.
Security & privacy
- When you create space for yourself on a scratch disk you probably won't want to share this with other users. Restricting access to your folders and files on scratch disks is easy; assuming you have created a scratch directory called 'jbloggs' on scratchcomp04, the following command will restrict access to yourself only:
chmod 700 /scratchcomp04/jbloggs
- You can now check the permissions on your scratch directory:
andy@macomp04:~ $ ls -ld /scratchcomp04/jbloggs
drwx------ 25 jbloggs mastaff 4096 Apr 30 13:13 /scratchcomp04/jbloggs
- note the drwx------- in this case the 'd' signifies the folder is a directory while the following 'rwx' shows the owner (that is, yourself) has read, write and directory access permissions for that directory but no-one else in your group or globally has any access.
- This is because the group permissions (the three dashes following the owner's rwx permissions) and the world permissions (the final set of three dashes) are not set to anything - in effect, this means others in your mastaff group and all other users have no permissions to access your folder or the contents within.
Research Computing Manager,
Department of Mathematics
last updated: 08.06.2018