There are different types of techniques to gain more disk space, such as sharing of space, freeing unused or redundant space, filesystem tuning and compression. Note: some of these techniques use memory instead of space. As you will see, there are many small steps necessary to free some space.
Stripping: Though many distributions come with stripped binaries today it is useful to check this. For details see man strip. To find every unstripped file you can use the file command or more convenient the tool findstrip. Attention: don't strip libraries, sometimes the wrong symbols are removed due to a bad programming technique. Or use the --strip-unneeded option.
Perforation: zum(1)reads a file list on stdin and attempts to perforate these files. Perforation means, that series of null bytes are replaced by lseek, thus giving the file system a chance of not allocating real disk space for those bytes. Example: find . -type f | xargs zum
Remove Odd Files and Duplicates: Check your system for core files, emacs recovery files <#FILE#> vi recovery files <FILE>.swp, RPM recovery files <FILE>.rpmorig and patch recovery files. Find duplicates, you may try finddup. Choose a system to name your backup, temporary and test files, e.g. with a signature at the end.
Clean Temporary Files: , e.g. /tmp, there is even a tool tmpwatch.
Shorten the Log Files: usually the files in /var/log.
Remove Files: Remove files which are not "necessary" under all circumstances such as man pages, documentation /usr/doc and sources e.g. /usr/src .
Unnecessary Libraries: You may use the binstats package to find unused libraries (Thanks to Tom Ed White).
Filesystem: Choose a filesystem which treats disk space economically e.g. rsfs. Tune your filesystem e.g. tune2fs. Choose an appropriate partition and block size.
Reduce Kernel Size: Either by using only the necessary kernel features and/or making a compressed kernel image bzImage.
Compression: I didn't check this but AFAIK you may compress your filesystem with gzip and decompress it on the fly. Alternatively you may choose to compress only certain files. You can even execute compressed files with zexec
Libraries: Take another (older) library, for instance libc5 , this library seems to be smaller than libc6 aka glibc2 .
Kernel: If your needs are fitted with an older kernel version, you can save some space.
GUI: Avoid as much Graphical User Interface (GUI) as possible.
Tiny Distributions: There are some distributions available which fit from one 3.5" floppy to 10MB disk space and fit for small memories, too. See appendix A and below.
External Storage Devices (Hard Disks, ZIP Drives, NFS, SAMBA): Since many notebooks may be limited in their expandability, using the parallel port is an attractive option. There are external harddisks and ZIP Drives available. Usually they are also connectable via PCMCIA. Another way is using the resources of another machine through NFS or SAMBA etc.
Use the tool hdparm to set up better harddisk performance. Though I have seen laptop disk enabled with striping, I can't see a reason to do so, because IMHO aka RAID0 striping needs at least two different disks to increase performance.
Mergemem Project . Many programs contain memory areas of the same content that remain undetected by the operating system. Typically, these areas contain data that have been generated on startup and remain unchanged for longer periods. With mergemem such areas are detected and shared. The sharing is performed on the operating system level and is invisible to the user level programs. mergemem is particularily useful if you run many instances of interpreters and emulators (like Java or Prolog) that keep their code in private data areas. But also other programs can take advantage albeit to a lesser degree.
You may also reduce the kernel size as much as possible by removing any feature which is not necessary for your needs and by modularizing the kernel as much as possible.
Also you may shutdown every service or daemon which is not needed, e.g. lpd, mountd, nfsd and close some virtual consoles. Please see Small-Memory-mini-HOWTO for details.
For information about APM look at the APM chapter above.
A hacked rclock . Booker C. Bense has hacked the rclock program to include a simple battery power meter on the clock face.
xbatstat. A battery level status checker for Linux and X.
The "noatime" option when mouting filesystems tells the kernel
to not update the access time information of the file. This
information, although sometimes useful, is not used by most people (do
you know that ls -lu gives you the access time?). Therefore,
you can safely disable it, then preventing disk access each time you
cat a file. Here is an example of a /etc/fstab
with this power-saving option:
/dev/hda7 /var ext2 defaults,noatime 0 2
hdparmhdparm is a Linux IDE disk utility that lets you set spin-down timeouts and other disk parameters. It works also for some SCSI features.
Mobile Update Daemon This is a drop-in replacement for the standard update daemon, mobile-update minimizes disk spin ups and reduces disk uptime. It flushes buffers only when other disk activity is present. To ensure a consistent file system call sync manually. Otherwise files may be lost on power failure. mobile-update does not use APM. So it works also on older systems.
noflushd: noflushd monitors disk activity and spins down disks that have been idle for more than <timeout> seconds. It requires a kernel >=2.2.11 . Useful in combination with hdparm and mount with noatime option to bring down disk activity.
Toshiba Linux Utilities This is a set of Linux utilities for controlling the fan, supervisor passwords, and hot key functions of Toshiba Pentium notebooks. There is a KDE package Klibreta, too.
At Kenneth E. Harker's page there is a recommendation for LCDproc
LCDProc . "LCDproc is a small piece of software that will enable your Linux box to display live system information on a 20x4 line backlit LCD display. This program shows, among other things, battery status on notebooks." I tried this package and found that it connects only to the external Matrix-Orbital 20x4 LCD display
http://www.matrix-orbital.com/, which is a LCD display connected to a serial port. I can't see any use for a laptop yet.
Diald: Dial Daemon . The Diald daemon provides on demand Internet connectivity using the SLIP or PPP protocols. Diald can automatically dial in to a remote host when needed or bring down dial-up connections that are inactive.
http://www.kde.org provides KAPM, Kbatmon and Kcmlaptop. Written by Paul Campbell kcmlaptop is a set of KDE control panels that implements laptop computer support functions, it includes a dockable battery status monitor for laptops - in short a little icon in the KDE status bar that shows how much battery time you have left. It also will warn you when power is getting low and allows you to configure power saving options.
Similar packages you may find at the GNOME project
http://www.gnome.org/ . See the software maps at both sites.
Many kernel features are related to laptops. For instance APM, IrDA, PCMCIA and some options for certain laptops, e.g. IBM ThinkPads. In some distributions they not configured. And the kernel is usually bigger than necessary. So it's seems a good idea to customize the kernel. Though this task might seem difficult for the beginner it is highly recommended. Since this involves dangerous operations you need to be careful. But, if you can install a better kernel successfully, you've earned your intermediate Linux sysadmin merit badge. - Since this topic is already covered in other documents I want handle this here.
A small collection yet, but I'm looking for more information.
BOA - "Lightweight and High Performance WebServer. boa is a single-tasking HTTP server. That means that unlike traditional web servers, it does not fork for each incoming connection, nor does it fork many copies of itself to handle multiple connections. It internally multiplexes all of the ongoing HTTP connections, and forks only for CGI programs (which must be separate processes.) Preliminary tests show boa is capable of handling several hundred hits per second on a 100 MHz Pentium."
MGR - a graphical windows system, which uses much less resources than X.
Low Bandwidth X:
Alan Cox in LINUX REDUX February 1998 " .. there are two that handle normal applications very nicely. LBX (Low Bandwidth X) is the official application of the X Consortium (now OpenGroup www.opengroup.org). Dxpc
http://ccwf.cc.utexas.edu/~zvonler/dxpc is the alternative most people prefer. These systems act as proxy X11 servers and compress datastreams by well over 50 percent for normal requests, often reaching a reduction to 25 percent of the original bandwidth usage. With dxpc, X windows applications are quite usable over a 28.8 modem link or across the Internet."
blackbox - "This is a window manager for X. It is similar in many respects to such popular packages as Window Maker, Enlightenment, and FVWM2. You might be interested in this package if you are tired of window managers that are a heavy drain on your system resources, but you still want an attractive and modern-looking interface."
xfce is a lightweight and stable desktop environment for various UNIX systems.
linux-lite - distribution based on a 1.x.x kernel for systems with only 2MB memory and 10MB harddisk. URL see above.
http://smalllinux.netpedia.net/ . Three disk micro-distribution of Linux and utilities. Based on kernel 1.2.11. Root disk is ext2 format and has fdisk and mkfs.ext2 so that a harddisk install can be done. Useful to boot up on old machines with less than 4MB of RAM.
screen - tiny but powerful console manager. John M. Fisk <firstname.lastname@example.org> in LINUX GAZETTE July 1, 1996 :"It's a GUI, GUI, GUI, GUI world! " -- or so the major OS manufacturers would have you belief. Truth is, that while this is increasingly the case, there are times when the command line interface (CLI) is still a very good choice for getting things done. It's fast, generally efficient, and is a good choice on memory or CPU constrained machines. And don't forget that there are still a lot of very nifty things that can be done at the console."
tinyirc - "A tiny, stripped down IRC Client. Doesn't have most of the more advance commands in the ircII family of IRC Clients, nor does it have any color, but it works, and it's tiny."
You may also take into account to upgrade the hardware itself, though this may have some caveats, see chapter Open a Laptop Case above. If you need a survey about the possibilities, you can take a look at
http://www.upgrade.de, this page is also available in French and English.