1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/rmlint.md

37 lines
1.3 KiB
Markdown
Raw Normal View History

2022-10-18 07:49:18 -08:00
# rmlint
> Find space waste and other broken things on your filesystem.
2022-10-18 07:49:18 -08:00
> More information: <https://rmlint.readthedocs.io/en/latest/rmlint.1.html>.
- Check directories for duplicated, empty and broken files:
2022-10-18 07:49:18 -08:00
`rmlint {{path/to/directory1 path/to/directory2 ...}}`
- Check for duplicates bigger than a specific size, preferably keeping files in tagged directories (after the double slash):
`rmlint -s {{1MB}} {{path/to/directory}} // {{path/to/original_directory}}`
- Check for space wasters, keeping everything in the untagged directories:
`rmlint --keep-all-untagged {{path/to/directory}} // {{path/to/original_directory}}`
2022-10-18 07:49:18 -08:00
- Delete duplicate files found by an execution of `rmlint`:
`./rmlint.sh`
- Find duplicate directory trees based on data, ignoring names:
2022-10-18 07:49:18 -08:00
`rmlint --merge-directories {{path/to/directory}}`
- Mark files at lower path [d]epth as originals, on tie choose shorter [l]ength:
2022-10-18 07:49:18 -08:00
`rmlint --rank-by={{dl}} {{path/to/directory}}`
2022-10-18 07:49:18 -08:00
- Find files with identical filename and contents, and link rather than delete the duplicates:
2022-10-18 07:49:18 -08:00
`rmlint -c sh:link --match-basename {{path/to/directory}}`
2022-10-18 07:49:18 -08:00
- Use `data` as master directory. Find only duplicates in backup that are also in `data`. Do not delete any files in `data`:
2022-10-18 07:49:18 -08:00
`rmlint {{path/to/backup}} // {{path/to/data}} --keep-all-tagged --must-match-tagged`