defragfs-fragmentation/README.md
2024-05-01 10:45:01 +02:00

58 lines
1.6 KiB
Markdown

defragfs/fragmentation - Linux file-system defragmenter & tool for calculate the fragmentation
==============================================================================================
### Authors:
* CanHao Xu <xucanhao@gmail.com>
* John Robson <john.robson@usp.br>
### Tools:
* [defragfs](https://git.q3aql.dev/q3aql/defragfs-fragmentation/src/branch/master/src/defragfs) - File-system defragmenter tool.
* [fragmentation](https://git.q3aql.dev/q3aql/defragfs-fragmentation/src/branch/master/src/fragmentation) - Tool for calculate fragmentation.
_Dependencies: `perl`, `coreutils`, `e2fsprogs`._
### Installation:
* Open the terminal and type the following comands:
```shell
$ git clone https://git.q3aql.dev/q3aql/defragfs-fragmentation
$ cd defragfs-fragmentation
$ sudo make install
````
_Note: You must install `git` previously._
### Syntax (defragfs):
```shell
$ sudo defragfs <partition or directory> [option]
Options:
-a Automatically defrag (configure: $max_fragrate and $max_avgfrags
according to your preference).
Use this in your crontab. e.g. sudo crontab -e (and add this line)
0 0 1 */2 * defragfs / -a
-f Force defrag if there is at least one fragmented file.
-h Display this Help.
````
### Syntax (fragmentation):
```shell
$ sudo fragmentation <directory>
````
### External links:
* [Perl website](https://www.perl.org/)
* [Coreutils](https://www.gnu.org/software/coreutils/coreutils.html)
* [E2fsprogs](http://e2fsprogs.sourceforge.net/)
* [ThomasCX/defragfs](https://github.com/ThomasCX/defragfs)