Wednesday, 4 September 2013

Defragging in Xubuntu

There is an inbuilt defragger in Xububtu called e4defrag.

 To get a count of files that are defragmented at the required location type

sudo e4defrag -c (location)
(location) can be:
a specified hard disk: sudo e4defrag -c /dev/sda1 or sudo e4defrag -c /dev/sda2

the root directory: sudo e4defrag -c /

the home directory: sudo e4defrag -c ~/

The program will supply a score and let you know if the specified location requires de fragmentation.

If it does then use the same command ommiting the switch -c, so to defrag root type:

sudo defrag /
sudo e4defrag /dev/sda1

sudo e4defrag ~/ 
To read the manual open a Terminal window and type:
man e4defrag