On Mon, Apr 04, 2016 at 12:39:53AM +0200, Adam Borowski wrote: > As "filefrag" seems to work fine for non-root, I think it should be moved > from */sbin/ to */bin/. In the past, it used FIBMAP which indeed was > root-only but as since kernel 2.6.28 we have FIEMAP, filefrag is useful for > ordinary users.
It's the "useful for ordinary users" test which I question. Most users (unless they have sudo access) aren't going to have raw access to the block device, so the actual block numbers aren't going to matter. Nor does knowing how fragmented a file might be going to be of interest to most users. To system administrators and file system developers, yes --- but to most users, I don't think so. Moving binaries around can break shell scripts, and doesn't really add a lot of value. If you're the sort of user that is interested in using filefrag, you'll probably also be interested in mkfs or debugfs, and those are in /sbin as well. So just add /sbin to your path. :-) - Ted