edit · print · PDF

Please note that all the SIEpedia's articles address specific issues or questions raised by IAC users, so they do not attempt to be rigorous or exhaustive, and may or may not be useful or applicable in different or more general contexts.

Keep your home directory and your mail Inbox under control

If you think that SIE staff are so experienced and computer savvy that saturating their home or Inbox quota is an event as likely as Harry Potter showing up in the Aula in the middle of a colloquium, well, you will be disappointed. We have all passed through the shame of finding our home directory completely full, or being unable to receive mail messages because there was no space left in our mail Inbox.

This is why we would like to offer a few tips on how to avoid such dishonorable experiences.

Check your home quota

To check how many bytes have been allocated to your home directory, and how much space you are currently occupying, use the quota command:
quota -s
which will print something like:

Disk quotas for user fulanito (uid 849):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
                 647M    2466M    2566M           13623   45000   50000

"M" here means Megabyte. Sometimes you get misleading quota values for other users, just ignore them.

The home quota allocated to regular users typically is 1 to 2 GB.

Many bad things may happen if you fill your home: the windows environment behave weirdly, you can lose your bookmarks and other browser/email configuration files, or find yourself unable to save a file you have been editing for hours, or you can get locked out altogether of your computer account.

Check your Inbox occupation

This is easily done by sending an email to quota@iac.es with Subject: quota. The immediate reply will look like:

        Usuario: fulanito
Espacio ocupado: 84.9% (212 de 250 MB)
 Num. de inodos: 65.2% (19572 de 30000)

Check both values, as once I somehow managed to actually saturate the inodes with still plenty of space left in the Inbox. For a regular user, the Inbox size typically varies between 1 GB and 2 GB.

Tricks to reduce the home occupation


A symbolic link (often shortened to symlink and also known as a softlink) consists of a special type of file that serves as a reference to another file or directory. A symbolic link does not point directly to data, but contains a symbolic path which an operating system uses to identify a hard link (or another symbolic link), which can even be on other mounted file systems. Symbolic links operate transparently, which means that their implementation remains invisible to applications. When a program opens, reads, or writes a symbolic link, the operating system will automatically redirect the relevant action to the target of the symlink. (Abridged from http://en.wikipedia.org/wiki/Softlink where you can find further details).

In practice, we can trick a program into believing that some file or directory is in our home, while it actually is in some other location, for instance in a scratch disk.

Let's see a couple of examples.

Package to be installed in home: Some software packages show a strong inclination to install themselves in the user's home directory, thus filling it completely. Some times, rather than tinkering with configure or install options and flags, it's simpler to create a symlink for the package directory. Let's say that package "xyz" by default installs into subdirectory xyz/ in your home. Before proceeding with the actual installation, create a symlink like:
cd $HOME ; ln -s /net/maquina/scratch/homedir/packages/xyz
(if you put no target name on the command line, the target will take the same name as the existing file or directory). This way you'll kill two birds with a stone: the package is apparently installed in your home, while the actual files are in a scratch disk with (presumably) plenty of free space.

Package configuration file: Some packages create files or directories in the user's home to store user's preferences, usage history, miscellaneous data etc. For instance, if you have used gimp-1.2 you will find in your home the directory ".gimp-1.2/" with many files and subdirectories inside. Such directories or files may grow with time and fill up your home space. Again, a symlink may be a good solution.
In my own case, I installed googleearth in Linux (it does not work, but this is another story ...). It caches images and other data in directory /home/user/.googleearth, and this cache may become tens or hundreds of MB in size. What I did, before launching the program, was something like:
cd $HOME ; mkdir /net/cherne/scratch/homedir/.googleearth ; ln -s /net/cherne/scratch/homedir/.googleearth

Warning: Please note that by creating and using symlinks as described above, since the data are not stored physically in your home directory, they are not included in the automated home backup copies.

Cache cleaning

Modern C/C++ compilers in Linux use a program called ccache to speed up compilation (see https://ccache.samba.org/ for details). Temporary files are stored in directory ~/.ccache which may quickly grow up to several hundreds of Megabyte. So it is useful to clear it after compiling a big package, or set a limit to its maximum size. The relevant commands are:
ccache -C    # clear the cache completely
ccache -s    # show statistics summary
ccache -M    # set maximum size of cache
for further details and options, type ccache --help


BleachBit "frees disk space and maintains privacy. Cleans cache, Internet history, temporary files, logs, cookies, and broken shortcuts. Cleans Firefox, Google Chrome, Opera, Windows, Linux, and much more." It is a very useful tool to reduce your home occupation by getting rid of unnecessary files. Just be careful about what options you select (so as for instance to avoid deleting stored passwords, or browser history, etc.). It can be easily installed on fedora by yum/dnf. Usage is pretty simple and intuitive.

Besides the graphical interface (which can be launched by just typing bleachbit), it can also be used from the command line. Just a few examples:
bleachbit --preview firefox.cache     # then we can proceed with ...
bleachbit --clean firefox.cache
bleachbit --list     # list all cleaners (items that can be cleaned)

Tricks to reduce the mail Inbox occupation

The emails we receive are stored in the IMAP server, that is, they are physically located in a disk in the email server. If you do nothing, the Inbox space allocated to you will saturate rapidly and you will be unable to receive or even send emails. What can we do to reduce our mail space occupation?

Don't send large emails and attachments

There is no point in sending MB-sized emails or attachments. This, besides annoying the recipients, may increase the space occupied by your own emails if you keep a copy of all sent messages. You may copy the relevant files to burdeos (if you interchange files within the IAC), put them in some web page and just send the link, copy them to the FTP if people from outside the IAC need to access them, or use some third party tool, for instance http://wetransfer.com

Clean Out Your Folders

Delete frequently from your folders (Inbox, Sent, and all subfolders) all those mails you no longer need to keep. Then, open the "File" menu, "Empty Trash" and "Compact Folders".

Delete all Junk emails

If you, like me, use the Thunderbird Junk tool to automatically recognize junk messages, but instead of deleting them automatically you redirect them to a Junk folder where you can look for false positives (legitimate messages wrongly identified as spam), then such folder can increase in size very rapidly. Clean it regularly.

Delete Attachments

Often attachments are responsible for most of the space occupied in the mail server. After saving them, you probably do not need them anymore in the email, though you probably want to keep the email body. The latest versions of Thunderbird allow to delete an attachment from an email leaving the mail body intact. To do it, click with the right-button on the attachment and select Delete from the pop-up menu. This'll generate a new, attachment-free copy of the mail, with a short note with the names of the attachments that were deleted. (From time to time the original email doesn't get deleted automatically; in such case delete it by hand).

Move emails to Local Folder

Emails can also be moved and stored in Local Folders, whose exact location can be configured in Thunderbird or Mozilla. If you have local folders in your home, they can quickly fill up the quota: however, they are included in the automated home backups. If local folders are in some local disk, probably they do not have significant restrictions in size, however no backup is done (you'll have to do it yourself). The choice is up to you.

Limit the number of messages in your Inbox

Though this is not strictly a space issue, it is very recommendable to keep only a small number of messages in the Inbox, and move all the messages you can to subfolders. The bigger the Inbox, the more work the server must do to look for and retrieve new messages, which, multiplied by the number of IAC users, can overload and slow down the email server (so, now you know that if it seems it takes quite a long time to read new messages, the server or the network are not those to be blamed ...)

edit · print · PDF
Page last modified on August 24, 2016, at 10:49 AM