I don't want any answer saying that there's no need, please!
|
|
|
Use e4defrag to defrag your files If your ext4 file system is created with the Just check fragmentation level with something like this (you need to be root to see details):
Here's an example of the output you can get:
As in this example, most of the time it will tell you that no defragmentation is needed, but if you want to do it anyway you can use (you don't need to use sudo to defrag your own files):
Your users can even run it on their own files, there's no need to be root unless you want to work on other user's or system files.
|
|||||||||
|
|
Take a look on e2fsprogs. This is also available in the Ubuntu packages. It provides the program e4defrag. |
|||||||||||||
|
Use Gparted to defrag your file systemIf you have enough space on your hard drive, you can use Gparted to defrag your file system (ext2, ext 4, nfts, etc.). You have to boot from a CD/DVD/USB boot disc because the drive you're working on has to be unmounted. You also have to have more unused space available than used space for this to work and it may take a while.
With the partition you want to defrag as the last partition on the drive:
It's now defragged. And I know you're not interested in why/why not to defrag ubuntu, but I'll post the link to why-is-defragmentation-unnecessary anyway. |
|||||||||||||||||||||
|
|
Ubuntu 14.04 LTS does place (at least the primary drive) into EXT4 partition when installed on a clean install (not residing on top of Win-Junk). In this case, if you have just set up a new system, or formatted fresh on an old system and then did a clean install, then by default with 14.04 LTS, you have an EXT4 Partition at Now, just open a Terminal (CTRL-ALT-T) and type:
and be patient until the 'check' is completed and you get the fragmentation report back. If you aren't confident about having an EXT4 Partition on your OS drive, simply go HOME and type We MUST stop making command-line so intimidating for 'latent Win-Junk users' who are just seeing the light. I say 'command-line' and my wife's eyes freeze in abstract terror, because I once told her that unlike Win-Junk, when UNIX was first programmed, they didn't feel they needed to ask you 12-times 'do you really, really want to delete this?' before they honored your DEL and eradicated the trash. Of all the things I have ever said, in 30-years of marriage, this is probably one of the only things she has ever taken to heart, and remembered forever. I am only now getting her away from her fear of 'TERMINAL' and 'COMMAND-LINE' phrases, to where she will actually use Linux (then again, she's been using it for years in our home and work networks, and never realized it, either). |
||||
|
|