How to make space in your home dir

If you fall short on space, you need to (re)move some files. Here are some general tips to track the most space-consuming files. The space in /user/connex is expensive due to the backup policy, so you need to be carefull when you write:

  • Temporary data files generated by computations;
  • Big PostScript files (at least you can compress them);
  • Media files (videos, music, etc.)
  • Big personal files not related to work…

The following tips were tested with the GNU version of the unix utilities. They are present in all Linux distributions, but you may experience some problems if you are using Solaris.

Other Disk Spaces

The disk space in /user/connex is expensive because it is backed up every night and bakups are stored for two years. The first thing you can do is move your big files in other locations. For example:

  • local hardisk(s) of your workstation. Keep in mind that, if you run computations on your station, the local disk acces is faster storage than remote disk access. You can have these backed up too, just ask Nicolas.
  • /user/spc (backed up, so choose carefully what you add there)
  • /user/spcscratch (no backups)
  • /user/scratch (no backups)

Disk Usage

First, you can find your total disk usage, in the /user/connex/disk_usage/ directory. The disk usage is computed each week. Look for the more recent file.

Then, the du utility allows you to scan your home for the big directories/files. For example, if you want to find big files/dirs in your ~/data dir, you can use:

falcone@pcfalcone$ du -sh  ~/data/*
0       /user/connex/falcone/data/’%-10s
7.0M    /user/connex/falcone/data/AAindex
656K    /user/connex/falcone/data/allforam14-B-2002.mase
418K    /user/connex/falcone/data/belin
570K    /user/connex/falcone/data/cachat
24K     /user/connex/falcone/data/distforams
2.2M    /user/connex/falcone/data/
18K     /user/connex/falcone/data/Librairie_22.03.04_A.xls
70K     /user/connex/falcone/data/librairiePlaia
73M     /user/connex/falcone/data/papers
24K     /user/connex/falcone/data/paul_bookmarks.html
600K    /user/connex/falcone/data/
7.1M    /user/connex/falcone/data/renee
6.2M    /user/connex/falcone/data/sequences

The -s option stands for 'summary' and displays the total size of each items (sums the items in a dir). The -h option stands for 'human readable' and displays the sizes in a convenient unit.

The config dirs and files in the home directory can be very space consuming, consider removing them for the software you do not use anymore. You can track them with the following command:

$ find ~ -maxdepth 1 -name ".*" | xargs du -sk | sort -n

It prints the config dirs, sorted by size. The size is displayed in kB.

Find Big And Old Files

Alternatively, the find utility allows to find big files. For example, to find all files bigger than 10 MB, run:

falcone@pcfalcone ~/data $ find ~ -size +10M -print

Find can search for old files too. For example, to search the files not modified in the last 2 years (730 days) and bigger than 1 MB, you can use:

falcone@pcfalcone ~/data $ find ~ -size +1M -mtime +730 -print

Finally, you can scan your home for core files and remove them automatically with:

$ find ~ -name "core*" -type f -print | xargs /bin/rm -f


You can easily compress your data files with the very efficient bzip2 utility. For example, if you want to archive the exp-2006-march/ directory, you can run:

$ tar -jcvf exp-2006-march.tbz2 exp-2006-march/

The -j options makes the compression. To uncompress:

$ tar -jxvf exp-2006-march.tbz2

Move your FireFox/Mozilla Cache Directory

You can save space by moving the firefox/mozilla cache directory to your local hard disk. Of course, this operation will improve the speed too.

There is no UI setting for this feature. Although the operation can seem a little bit tricky, it is very easy and safe:

  1. Choose a directory in your local hard disk (For example, I chose /localhome/falcone/firefox/)
  2. Type in the URL bar: about:config, a page will appear with all your settings
  3. Right-click on any entry and choose in the pop-up menu: New > String.
  4. A pop-up window will appear, type browser.cache.disk.parent_directory, press OK.
  5. Another pop-up window will appear, type the location you chose.
  6. That's all ! Restart your browser and enjoy, you can now remove the old cache.

You can now have a greater cache size without consuming your precious disk quota. For further information:

High compression ratio