Oct 26, 2013

How to check disk fragmentation in Linux?

Is there a way to check fragmentation of a disk in Linux other than the occasional fsck report on boot?

Linux does not need defragmenting since it comes from the same family of Macs: UNIX.
HTG Explains: Why Linux Doesn’t Need Defragmenting

"If you’re a Linux user, you’ve probably heard that you don’t need to defragment your Linux file systems. You’ll also notice that Linux distributions don’t come with disk-defragmenting utilities. But why is that?

To understand why Linux file systems don’t need defragmenting in normal use – and Windows ones do – you’ll need to understand why fragmentation occurs and how Linux and Windows file systems work differently from each other."
Yes, you can run fsck yourself. Here is the script cutesy of Rucent88 at Superuser:
Answer this