
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]For each machine that you have an account on, you have something called a quota. Setting a quota for each user is a management tool that is used to insure that the available space is equitably shared and not all the space is "used up". This tool insures that one person does not "hog" a whole disk and at the same time protects the system against "run away" programs!
There are two parts of quota, the soft limit and the hard limit. If your disk usage is over the SOFT quota limit, you will receive a warning. While over your soft limit, you may keep creating files and proceed normally for a limited amount of time or until you hit your HARD quota limit. Once your hard limit is reached you will not be allowed to write anything else to disk. To determine your disk usage level, type "quota" or if you are now over quota, type "quota -v". To determine usage in a specific directory, type "du" while in that directory.
If you encounter your hard limit while running a program, the program will most likely core dump when an attempt is made to write the file. If you are in the editor, you will not be able to save a copy of your files contents. DO NOT GET INTO THE EDITOR if you have reached your hard limit! If you do, you will zero out your file.
You could save the file you have been editing from obliteration by not writing (ie, DON'T :wq) and not exiting the editor until you write a copy of the file to a temporary location, outside your personal directory system, like ":w/zap/your.login/filename". After writing the file and quitting the editor with ":q!", remove obsolete files to get under your quota limit and then retrieve that file stored in the zap directory with the command "$ cp /zap/your.login/filename filename".
REMEMBER, /zap is cleaned out frequently!With most ECN machines you will have 3 days (3 logins for VAX machines) to get your disk usage below your soft quota limit. Otherwise, your HARD quota is automatically lowered to be the same value as your SOFT limit! There are various ways to conserve space, so that you do not go over your quota.
% compress filenameThe compressed file will be stored in your current directory with the appended ".Z" for identification. In compressed form a file takes up about 1/2 - 2/3 as much disk space! ("compress -v file" will print the compression percentage.) You may use meta characters, like (*), to compress multiple files. For example:
% compress *.fwill cause all the FORTRAN files to be compressed. WARNING: Don't edit (edit/ex/vi) compressed files.
To look at a compressed file, type:
% zcat file.ZTo make it a normal file again, type:
% uncompress file.ZFor more info type "help compress".
NOTE: If you are at your hard limit, you cannot compress files because an original version is kept while the compressed version is being written. You may need to see your site specialist for help! 2. To see a listing of your files, their size, and the date last accessed, you could type: % ls -lu or to recursively look down all your directories, use the "-R" option, and pipe through "more": % ls -luR | more Note the location of old files to remove and any files called "core" because core dumps will be huge! % rm core 3. If you have executable programs that you are keeping (like renaming a.out to RUN.x because the program is done and you want to keep the executable around), there is a command called strip that removes the symbol table and takes out extraneous information so that your executable is smaller. For example: % ls -s a.out 84 a.out % strip a.out % ls -s a.out 72 a.out Remember to do your debugging before stripping the file. Once a file is stripped, the only way to recover the stripped information is to recompile. To implement the strip command at compile time add " - -s " after all compiler flags are given but before the library flags are invoked (-lm, -limslib, etc.). Examples for f77 and fort are below: %f77. -O program.f -s -limslib %fort -V -O program.f - -s -limslib For more info type "help strip". 4. If you have lots of little teeny files, you may organize them by putting them into an archive (see "help ar") and then compress the whole archive...don't compress each file, just compress the archive file. Below are examples of file compression. First is a comparison in space savings between compressing seven small files and archiving the same seven files then compressing. The final examples demonstrates the substantial space save when compressing large files. Seven small files compressed: % ls -s m* 2 m.ascelzr 2 m.garon 2.mtgt 2 m.bronkema 2 m.janet 2 m.cartwrig 2 m.screendump % compress m* % ls -s m* 2 m.ascelzr.Z 2 m.garon.Z 2.mtgt.Z 2 m.bronkema.Z 2 m.janet.Z 2 m.cartwrig.Z 2 m.screendump.Z --With this action you are not really saving yourself anything!-- The same seven files archived, then compressed: % uncompress m* % ar r My.Mail m* ar: creating My.Mail % ls -s My.Mail 8 My.Mail % compress -v My.Mail My.Mail: Compression: 40.54% -- replaced with My.Mail.Z % ls -s My.Mail.Z* 4 My.Mail.Z Example of very large data files compressed: % ls -s data* 120 data3 248 data5 % compress -v data* data3: Compression: 77.62% -- replaced with data3.Z data5: Compression: 78.35% -- replaced with data5.Z % ls -s data* 25 data3.Z 51 data5.Z