rmlint

Filemanagers, partitioning tools, etc.
Post Reply
Message
Author
robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

rmlint

#1 Post by robwoj44 »

https://github.com/sahib/rmlint
Tool to remove duplicates and other lint. rmlint is a commandline tool to clean your filesystem from various sort of lint (unused files, twins, etc.).
No menu entry. Type in terminal rmlint -h to see the help.
Attachments
rmlint-1.0.6b.pet
remove duplicates
(36.04 KiB) Downloaded 553 times

SeeSpotRun
Posts: 2
Joined: Tue 13 Jan 2015, 08:20

rmlint 2.0

#2 Post by SeeSpotRun »

HELLO PUPPY PEOPLE.

Just letting you know that rmlint has been completely re-written and is now faster, more flexible and better documented. (If you are used to using the old rmlint, take a few minutes to check the manual because the command-line options have changed.)

I've never prepared a "pet" so if someone can prepare a fresh "pet" that would be great.

rmlint finds space waste and other broken things on your file system and creates an executable script that you can use to remove it.
It is especially good at finding duplicates in your files and getting rid of
them.

The credit belongs to the main author (sahib) but I am happy to have made a small contribution as well.

https://github.com/sahib/rmlint (Stable Branch)
https://github.com/sahib/rmlint/tree/develop (Development Branch)
https://github.com/sahib/rmlint/issues (Feature/Bug/Issue tracker)
https://rmlint.rtfd.org (Documentation)


ANY HELP NEEDED?

It's still fresh software that needs [pet] packagers, translators, bugfixers and mostly testers.

Enjoy!

Pelo

Tested on brand new Puppy

#3 Post by Pelo »

Tested on brand new Puppy. Bookmarked for use with another one. I am very, but very interested :)

┌─[root][01:57 ][~]
└─[pup_jessie][$] rmlint -h
Syntax: rmlint [TargetDir[s]] [File[s]] [Options]

General options:

-t --threads <t> Set the number of threads to <t> (Default: 4; May have only minor effect)
-p --paranoid Do a byte-by-byte comparison additionally for duplicates. (Slow!) (Default: No.)
-j --junk <junkchars> Search for files having one letter of <junkchars> in their name. (Useful for finding names like 'Q@^3!'')
-z --limit Minimum and maximum size of files in Bytes; example: "20000;-1" (Default: "-1;-1")
-a --nonstripped Search for nonstripped binaries (Binaries with debugsymbols) (Slow) (Default: No.)
-n --namecluster Search for files with the same name (do nothing but printing them) (Default: No.)
-k --emptyfiles Search for empty files (Default: Yes, use -K to disable)
-y --emptydirs Search for empty dirs (Default: Yes, use -Y to disable)
-x --oldtmp <sec> Search for files with a '~'/'.swp' suffix being min. <sec> seconds older than the corresponding file without the '~'/'.swp'; (Default: 60)
Negative values are possible, what will find data younger than <sec>
-u --dups Search for duplicates (Default: Yes.)
-l --badids Search for files with bad IDs and GIDs (Default: Yes.)
-d --maxdepth <depth> Only recurse up to this depth. (default: inf)
-f --followlinks Whether links are followed (None is reported twice, set to false if hardlinks are counted as duplicates) (Default: no)
-s --samepart Never cross mountpoints, stay on the same partition. (Default: No.)
-G --hidden Also search through hidden files / directories (Default: No.)
-m --mode <mode> Tell rmlint how to deal with the duplicates it finds (only on duplicates!).:

Where modes are:

list - Only list found files and exit.
link - Replace file with a symlink to original.
ask - Ask for each file what to do.
noask - Full removal without asking.
cmd - Takes the command given by -c/-C and executes it on the duplicate/original.
Default: list

-c --cmd_dup <cmd> Execute a shellcommand on found duplicates when used with '-m cmd'
-C --cmd_orig <cmd> Execute a shellcommand on original files when used with '-m cmd'

Example: rmlint testdir -m cmd -C "ls '<orig>'" -c "ls -lasi '<dupl>' #== '<orig>'" -v5
This would print all found files (both duplicates and originals via the 'ls' utility
The <dupl> expands to the found duplicate, <orig> to the original.

Note: If '-m cmd' is not given, rmlint's default commands are replaced with the ones from -cC
This is especially useful with -v5, so you can pipe your commands to sh in realtime.
Regex options:

-r --fregex <pat> Checks filenames against the pattern <pat>
-R --dregex <pat> Checks dirnames against the pattern <pat>
-i --invmatch Invert match - Only investigate when not containing <pat> (Default: No.)
-e --matchcase Matches case of paths (Default: No.)

Misc options:

-h --help Prints this text and exits
-o --output [<o>] Outputs logfile to <o>. The <o> argument is optional, specify none to write no log.
Examples:

-o => No Logfile
-o"la la.txt" => Logfile to "la la.txt"

Note the missing whitespace. (Default "rmlint")

-v --verbosity <v> Sets the verbosity level to <v>
Where:
0 prints nothing
1 prints only errors and results
2 + prints warning
3 + info and statistics
4 + dumps log to stdout (still writes to HD)
5 + dumps script to stdout (still writes to HD)
6 + rdfind-like informative output

Default is 2.
Use 6 to get an idea what's happening internally, 1 to get raw output without colors, 4 for liveparsing purpose.
-B --no-color Don't use colored output.

Additionally, the options b,p,f,s,e,g,o,i,c,n,a,y,x,u have a uppercase option (B,O,G,P,F,S,E,I,C,N,A,Y,X,U) that inverse it's effect.
The corresponding long options have a "no-" prefix. E.g.: --no-emptydirs

Version 1.0.6b compiled: [Aug 10 2014]-[10:03:20]
Author Christopher Pahl; Report bugs to <sahib@online.de>
or use the Issuetracker at https://github.com/sahib/rmlint/issues

Licensed under the terms of the GPLv3 - See COPYRIGHT for more information
See the manpage, README or <http://sahib.github.com/rmlint/> for more information.
┌─[root][01:58 ][~]
└─[pup_jessie][$]

Pelo

Nice ! useful !

#4 Post by Pelo »

Nice ! useful !
Attachments
rmlint.png
only one duplicate picture, ok.
(37.07 KiB) Downloaded 247 times

Pelo

some work has to be done in your tool case !

#5 Post by Pelo »

:( pelo, some work has to be done in your tool case !
71 are now duplicate, 71 only ! :D
Attachments
duplicate.png
(51.16 KiB) Downloaded 214 times

Pelo

rmlint is nice

#6 Post by Pelo »

fslint does not work with my Precise 5.7.1. rmlint on try. Feed back soon
Yes 200 Mbs deleted pets (stored in several directories, main reason)

Post Reply