Student accounts in the Computer Science Department are to aid students in completing CS Department coursework. Other activities which may advance a student's education, but do not relate directly to current coursework, are of secondary importance. Activities which do not advance a student's education in the CS department are not permitted when using CS Department resources. These include word processing, game playing, downloading multimedia, commercial endeavors, or participating in any illegal, hateful, or offensive practices. Policies relating to CS Department computers and accounts reflect the fact that the Department needs to effectively allocate its resources and maintain the security of its network. We reserve the right to delete or seize any files which we consider inappropriate or unnecessary on the Computer Science Department Network File server. This includes MP3s, multimedia files, copyrighted material, and any other files which are not necessary for your current semester's coursework.
Disk Quotas are limits on how much server space a single user can control. Quotas prevent a single user from taking more than his or her share of system resources. Disk space is a limited resource and by placing limits on server disk space, we are able to maintain enough server space for all of our system's needs.
Your disk usage which counts against the quota is calculated by totaling the space used by all files owned by you that are stored on the file server. This number should generally be the same as the sum of all the files in your home directory. Your quota limit is determined by your status in the Computer Science Department:
To determine which group you are in, type
id at a Linux terminal.
id returns the user (uid) and group (gid) ownership settings for your files. The gid is your status on the CS Department network. Another way to determine your status is by the location of your home directory. Type pwd from your home directory to see the location of your directory on the server. If you are incorrectly classified, please see the System Administrators.
There are two types of quota limits: hard and soft limits. Your official quota is your soft limit. When you exceed your soft limit you will be unable to log in to a graphical session in the open labs. Should this happen, you will have to log onto the Linux machines using the text console (using ctrl-alt-F1 or ctrl-alt-F2) and free up some space. Should you use a Linux text console, remember to log out (type
exit and press enter) and return it to graphical mode (ctrl-alt-F7) when you are finished. You will not be able to save a file that will put you over your hard limit. The hard limits are Guest: 12GB, UGrad: 18GB, and Grad: 25GB. If you hit your hard limit, the computer may start behaving strangely as it cannot write any files to your home directory.
The best way to stay below quota is to delete old files. Your account should enable you to complete your coursework for the current semester. You can save old coursework to a flash drive, available at the bookstore in various sizes. Also be sure to empty your Trash regularly as that counts against your quota until emptied.
A good place to start is by cleaning out your Trash (found in
.cache directories. If you delete files within Linux using the file browser but don't empty the trash, they still count against your quota (they are just moved to a Trash folder, which still resides in your home directory).
You are advised, admonished, and warned to make backups of your data on a flash drive or in some secondary location. Do not rely exclusively on the CS department to save you. We are unable to retrieve any files from backups for students. For more information, see Account Policies & Lab Rules.
Many students start as “guests” in the CS program, later declare their intent to major in Computer Science, but their status on the network doesn't get changed. If you are incorrectly classified, then come see the System Administrators in 1140 TMCB.
If you are having other problems with your quota, please double check that you are classified correctly on the network, that you really are taking up less disk space than your quota limit, and that you have deleted all unnecessary files. Then, see the System Administrators in 1140 TMCB if you need further assistance or don't know how to go about doing these things.
To delete files with Dolphin, you should find the files you want to delete and select them. You can then delete them either using the Delete key or by right clicking on them and selecting
Move to Trash. Then, make sure to empty the Trash!
Though most of your account maintenance can be performed graphically, we will describe how to perform most of these functions from the terminal prompt.
The best way to get an accurate total of your quota usage is to run the quota script:
Where the output reports blocks shows the number of kilobytes you are using on the network.
The shell command du is a very useful way to check your disk usage. The basic command is:
from your home directory. The -h displays the usage values in human readable form, i.e. with a K for kilobytes or an M for megabytes. Including the -s option will present a summary of the total usage, rather than giving you the size of each individual file and subdirectory. To find out more about du or to explore other exciting du options try using the man du command.
To see a sorted list of your files sorted by size, the following command is very useful:
du -h --max-depth=1 | sort -h
In this command, the –max-depth=1 defines how mnay levels it should display (very usefull to get a good handle on what directories use the most space). Sending it to sort -h sorts it by size (the -h allows you to sort the human-readable output of du -h).
grep is a very useful command to use with du. grep searches through its input for the provided search string and outputs the lines of input which contain the string. You can input into grep the output of du using the pipe '|'.
du -h | grep csproject
will return the sizes of directories and files containing the word “csproject.”
To just see the listing of what's using a large amounts of disk space:
du -h | grep M
will return all the lines that have “M” in it (megabytes)
Deleting files in Linux is done with the rm (remove) command. Be very careful with this command. You can remove multiple files with wildcards like *, ?, and regular expressions. Make sure that you know exactly what files you will be deleting with your expression:
The rm expression will not delete directories without the -r option. You can remove empty directories using the rmdir command. The safest way to remove a number of directories is to remove all of the files in each directory, then rmdir the directory. That should help you avoid accidentally deleting something important.
You can copy files using the cp command. The basic syntax is:
cp <source> <destination> -r (recursive) -- copies the directory and all sub directories to the destination. Preserves directory structure. -v (verbose) -- lists each file that is copied. -p (preserve) -- preserves file attributes.
cp will not copy directories without the -r command.
You can make new directories with mkdir.
The standard Linux compression utility is gzip. The command gzip compresses a single file and appends .gz to the end of the filename. Files compressed with gzip are uncompressed with the gunzip command. For example, to compress <myfile> use
gzip <myfile> which yields <myfile>.gz. To uncompress <myfile>.gz use
gunzip <myfile>.gz to get <myfile>. gzip preserves access and modification times.
Flags: -r (recurse) individually compresses or decompress each file in each subdirectory. -h (help) lists options for gzip or gunzip. -l (list) report compression statistics for file
gzip and gunzip only compress one file at a time. To combine a directory of files into a single file for compression you should use tar. tar is a utility for managing backup archives.
tar -cf <outfile>.tar <indirectory>
creates an archive of name <outfile>.tar from the directory <indirectory>. -c (create) makes a new archive and -f (file) specifies that the output should be a file (rather than the console).
tar -xf <outfile>.tar
De-archives the tar file to output the original directory with the original filenames. -x (extract) tells tar to de-archive, and -f (file) specifies that the input comes from a file.
An especially important command with tar is -z which uses gzip to compress the tar archive. Should you want to compress an entire directory <mydir> the syntax would be:
tar -czf <outfile>.tar <mydir>
which would produce <outfile>.tar in the same directory as <mydir>. If you wanted to, you could now delete <mydir> and leave only the compressed version <outfile>.tar. When you want to read <outfile>.tar again you should use the command:
tar -xzf <outfile>.tar
which would create <mydir> again, allowing you to delete <outfile>.tar.
Flags: -v (verbose) outputs to console each action that takes place. -t (list) lists the files in the archive. -tv (list verbose) gives the same information as ls -l about the files in the archive. -A (concatenate) appends tar files to an archive. -r (append) appends input to the end of an archive.
There is also a zip and unzip utility that reads DOS PKZip files (PowerArchiver uses PKZip by default). The command:
zip -r <outfile>.zip <indir>
-r tells zip to recursively zip the directoryto create .zip:
unzips <outfile>.zip to create <indir>. zip and unzip have a lot of other options aswell.
bzip2 is another compression utility. The syntax is:
to compress yielding .bz2. To decompress the syntax is:
bzip2 -d <infile>.bz2
For more information you should refer to the man pages for gzip, tar, zip and bzip2.