Quotas
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
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 is determined by your status in the Computer Science Department, but for most students, the quota is 25 GB. This quota is higher for students in the animation program, due to the size of animation projects.
What Happens When I Go Over Quota?
There are two types of quota limits: hard and soft limits. Your official quota is your soft limit, however, quota policy will allow you to temporarily exceed the soft limit during the grace period. For most users these limits look like this:
- Soft limit: 25 GB
- Hard limit: 30 GB
- Grace period: 7 days
The file server will deny any operations that would put you over your hard limit. Additionally, if you are over your soft limit and beyond the grace period, the file server will deny any operations that would add data to your account. This typically causes the following behavior when logging in to an open lab computer:
Unable to update ICEAuthority file
warning during login- Unusually long login times
“Indicator Applet Complete” has quit unexpectedly
warning after logging in- Inability to run some programs (including Google Chrome)
In this limited state, you should still be able to run the file browser and terminal, which will allow you to get under quota. Refer to the following sections for guidance on cleaning up files. If you think you're under quota and it still doesn't work normally after logging out and back in, please contact the System Administrators.
How Do I Stay Below Quota?
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.
What Can I Delete from My Account?
A good place to start is by cleaning out your Trash (found in ~/.local/usr/share/Trash
), Desktop
, and .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).
I Accidentally Deleted My Files. Can I Get Them Back?
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.
Still Over Quota
If you are having other problems with your quota, please double check that you really are taking up less disk space than your quota limit and that you have deleted all unnecessary files. If you need further assistance please contact the System Administrators.
Deleting, Moving, and Copying Files
To delete files with the file browser, 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!
You can also use Shift + Delete
to permanently delete files. Only do this if you are certain that you don't need those files. Do not rely on the System Administrators to have a backup of your files.
Account Maintenance in Linux
Though most of your account maintenance can be performed graphically, we will describe how to perform most of these functions from the terminal prompt.
Determining Disk Usage
The shell command du is a very useful way to check your disk usage. The basic command is:
du -hs
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 useful options, run man du
.
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 '|'.
For example:
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, Copying Files, and Creating Directories
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:
rm <file>
- r (recursive) – removes all sub directories in the current directory, and their contents. This option is very dangerous.
- i (interactive) – prompt before removing each file. A good, safe thing to do.
- f (force) – do not prompt before removing files. Caution is warranted.
- v (vebose) – list each file that is removed. This can be very helpful. Hit Ctrl-c very quickly as soon as you notice a directory that you need being deleted.
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.
Compressing Files
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.
The command:
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).
The command:
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:
unzip <outfile>.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:
bzip2 <infile>
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.