Man rmlint
Hem / Kultur, Media & Underhållning / Man rmlint
This handler never fails.
Default is remove.
Good practice includes adding a $ anchor at the end of the regex.
Tips:
- l is useful for files like file.mp3 vs file.1.mp3 or file.mp3.bak.
- a can be used as last criteria to assert a defined order.
- o/O and h/H are only useful if there are hardlinks in the traversed path.
- o/O takes the number of hardlinks outside the traversed paths (and thereby minimizes/maximizes the overall number of hardlinks).
Either -o or -O may be specified multiple times to get multiple outputs, including multiple outputs of the same format.
Examples:
$ rmlint -o json # Stream the JSON output to stdout $ rmlint -O csv:/tmp/rmlint.csv # Output an extra CSV file to /tmp- -c--config=spec[=value] (default:none)
Configure a format.
This means, if the range is less than -q 0% to -Q 100%, than only partial duplicates are searched. We recommend the json formatter for every other scripting purpose.
Available options:
- omitfirst: Same as the -f / --omitfirst option in fdupes(1).
WRONG ASSUMPTIONS ARE THE BIGGEST ENEMY OF YOUR DATA. The following hash families are available (in approximate descending order of cryptographic strength):
sha3, blake,
sha,
highway, md
metro, murmur, xxhash
The weaker hash functions still offer excellent distribution properties, but are potentially more vulnerable to malicious crafting of duplicate files.
The full list of hash functions (in decreasing order of checksum length) is:
512-bit: blake2b, blake2bp, sha3-512, sha512
384-bit: sha3-384,
256-bit: blake2s, blake2sp, sha3-256, sha256, highway256, metro256, metrocrc256
160-bit: sha1
128-bit: md5, murmur, metro, metrocrc
64-bit: highway64, xxhash.
The use of 64-bit hash length for detecting duplicate files is not recommended, due to the probability of a random hash collision.
- -p--paranoid / -P--less-paranoid (default)
Increase or decrease the paranoia of rmlint's duplicate algorithm.
This speeds up subsequent runs on the same data set. You can use ls -i to show the inode number of a file and find -samefile <path> to find all hardlinks for a certain file.
- symlink: Tries to replace the duplicate file with a symbolic link to the original. several files may be chained together by the window.
files that do not appear to have a duplicate. In this case you write the original directory after specifying a single // on the command line.
rmlint
theharvester A tool designed to be used in the early stages of a penetration test. gdm-stop Immediately stop running the GNOME Display Manager (GDM). poetry-build Build a Poetry package as a tarball and a wheel. npm-it This command is an alias of `npm install-test`. git-subtree Merge subtrees together or split repository into subtrees. pamslice Extract one line of values out of a PAM image. lerna pip3 This command is an alias of `pip`. you-get Download media contents (videos, audios, images) from the Web. jp2a Convert JPEG images to ASCII. bpython A fancy interface to the Python interpreter. tlmgr-check Check the consistency of a TeX Live installation. brew-remove This command is an alias of `brew uninstall`. waybar Highly customizable Wayland bar for Sway and Wlroots based compositors. pnmcolormap Create quantization color map for a PNM image. docker-exec This command is an alias of `docker container exec`. d8 convmv Convert filenames (NOT file content) from one encoding to another. apktool Reverse engineer APK files. xcv Cut, copy, and paste in the command-line. xml-xmln This command is an alias of `xml pyx`. subfinder Discover valid subdomains for websites. gops List and diagnose Go processes currently running on your system. rawtoppm Convert a raw RGB stream to a PPM image. imapsync Email IMAP tool for syncing, copying, and migrating email mailboxes between two IMAP servers, one way, and without duplicates. ping Send ICMP ECHO_REQUEST packets to network hosts. ykinfo Get basic information from a YubiKey. aws-workmail Manage Amazon WorkMail. git-stage This command is an alias of `git add`. tslint A pluggable linting utility for TypeScript. nix-flake-show Show outputs provided by a flake. babeld Routing daemon for Babel which uses firewall-style filters. mycli A CLI for MySQL, MariaDB, and Percona that can do auto-completion and syntax highlighting. asciiquarium Display an animated aquarium in ASCII art inside the terminal. ncdu Disk usage analyzer with an ncurses interface. crane-manifest Get the manifest of an image. indent Change the appearance of a C/C++ program by inserting or deleting whitespace. docker-container-stats Display a live stream of resource usage statistics for containers. pycodestyle Check Python code against PEP 8 style conventions. kubectl-completion Generate shell completion code for `kubectl` commands. kubectl-autoscale Create an autoscaler to intelligently scale pod count based on kubernetes cluster demands. rails-generate Generate new Rails templates in an existing project. cpdf Manipulate PDF files. bash Bourne-Again SHell, an `sh`-compatible command-line interpreter. volta js runtimes, npm and Yarn package managers, or any binaries from npm. wpaclean Clean capture files to get only the 4-way handshake and a beacon. gcloud-kms-decrypt Decrypt a ciphertext file using a Cloud KMS key. qownnotes Markdown note-taking application. pamrgbatopng This command has been superseded by `pamtopng`. ppmtoppm Copy a PPM image. resume Easily setup a new resume. jj-rebase Move revisions to different parent(s). git-show-tree Show a decorated tree graph with all branches of a Git repository, showing annotations. mmv Move and rename files in bulk. zmore View `gzip` compressed files with `more`. svgtopam Convert an SVG file to Netpbm format. shc Generic shell script compiler. scrcpy Display and control your Android device on a desktop. z Tracks the most used (by frequency) directories and enables quickly navigating to them using string patterns or `regex`. docker-swarm A container orchestration tool. pulumi-stack-hist This command is an alias of `pulumi stack history`. crane-copy Efficiently copy a remote image from source to target while retaining the digest value. pbmtoicon This command has been superseded by `pbmtosunicon`. gh-config Change configuration for GitHub CLI. ocamlc The OCaml bytecode compiler. visudo Safely edit the sudoers file. gatsby Static site generator for React. ngrep Filter network traffic packets using `regex`. siege HTTP loadtesting and benchmarking tool. cargo Manage Rust projects and their module dependencies (crates). rustup-component Modify a toolchain's installed components. devpod Launch reproducible development environments using Docker, Kubernetes, or SSH. bat Print and concatenate files. aws-sqs Create, delete, and send messages to queues for the AWS SQS service. lighthouse Analyzes web applications and web pages, collecting modern performance metrics and insights on developer best practices. sambapipe.py Exploit CVE-2017-7494 (SambaCry) to upload and load a shared object (SO) file on a vulnerable Samba server for remote code execution. git-squash Squash multiple commits into a single commit. tlmgr-platform Manage TeX Live platforms. sfdk-deploy Deploy build results to a device. cp Copy files and directories. waitress-serve Pure Python WSGI HTTP Server. git-magic Automate add, commit, and push routines. bq A Python-based tool for BigQuery, Google Cloud's fully managed and completely serverless enterprise data warehouse. prowler-gcp Assess Google Cloud Platform (GCP) security best practices, audits, and compliance checks. bun-list This command is an alias of `bun pm ls`. chroot Run command or interactive shell with special root directory. pbmtopgm Convert a PBM image to PGM by averaging areas surrounding individual pixels. blackfire Monitor, profile, and test a PHP application. pg_amcheck Check for corruption in one or more PostgreSQL databases. jj-commit Update the description and create a new change on top. docker-rm This command is an alias of `docker container rm`. git-get-tar-commit-id Extract commit ID from an archive created using `git archive`. cmatrix Shows a scrolling Matrix like screen in the terminal. d2 A modern diagram scripting language that turns text to diagrams. adb-install Push packages to a connected Android device or emulator. shfmt Shell parser, formatter, and interpreter. leave Set a reminder for when it's time to leave. iperf3 Traffic generator for testing network bandwidth. cups-config Show technical information about your CUPS print server installation. apkleaks Expose URIs, endpoints, and secrets from APK files. dua Dua (Disk Usage Analyzer): get the disk space usage of a directory. git-feature Create or merge feature branches. pg_receivewal Stream the write-ahead log from a running PostgreSQL cluster. gocryptfs Encrypted overlay filesystem written in Go. sha256sum Calculate SHA256 cryptographic checksums. flutterfire Configure a Firebase project for your Flutter app. docker-rmi This command is an alias of `docker image rm`. git-mktree Build a tree object using `ls-tree` formatted text. date Set or display the system date. gettext Translates a string using stored translations in a compiled `.mo` file. emacs The extensible, customizable, self-documenting, real-time display editor. docker-ps This command is an alias of `docker container ls`. sui Interact with the Sui network. skopeo Container image management toolbox. git-sync Sync local branches with remote branches. pampick Pick images out of a multi-image Netpbm stream. cargo-rustdoc Build the documentation of Rust packages. idevicesetlocation Simulate a location on an iOS device. typeorm js, browser, Cordova, Ionic, React Native, NativeScript, and Electron platforms. emacsclient Open files in an existing Emacs server. jj-git-init Create a new Git backed Jujutsu repo. cidr Simplifies IPv4/IPv6 CIDR network prefix management with counting, overlap checking, explanation, and subdivision. pyats-shell Start a pre-loaded pyATS interactive Python Shell to save time in prototyping. xml-elements Extract elements and display the structure of an XML document. kaggle-config Manage Kaggle configuration. git-create-branch Create a Git branch in a repository. fly Tool for concourse-ci. git-diff-tree Compares the content and mode of blobs found via two tree objects. git-obliterate Delete files and erase their history from a Git repository. phpenv A PHP version manager for development purposes. git-reflog Show a log of changes to local references like HEAD, branches, or tags. pnmtosir Convert a PNM file to a Solitaire Image Recorder file. dolt-merge Join two or more development histories together. git-bugreport Captures debug information from the system and user, generating a text file to aid in the reporting of a bug in Git. wuzz Interactively inspect HTTP requests and responses. mp3info Viewer/editor for ID3v1 (but not ID3v2) tags of MP3 files. psysh A runtime developer console, interactive debugger, and REPL for PHP. dcfldd Enhanced version of dd for forensics and security. 7z File archiver with a high compression ratio. licensor Write licenses to `stdout`. npm-ping Ping `npm` registry. az-storage-entity Manage Azure Table storage entities. avrdude Driver program for Atmel AVR microcontrollers programming. kcadm.sh Perform administration tasks. ng-analytics Manage Angular CLI analytics settings. elasticsearch-node Manage low-level Elasticsearch node operations such as shutdown, repurpose, or viewing info. conda-run Run an executable command in a conda environment. puppet-apply Apply Puppet manifests locally. kubeseal Client-side utility for encrypting Kubernetes secrets using the Bitnami Sealed Secrets controller. lprm Cancel queued print jobs of a server. pip-config Manage local and global configuration for pip. cargo-clippy A collection of lints to catch common mistakes and improve your Rust code. pipes.sh A Bash script which draws randomly pathed pipes over the terminal. ksh Korn Shell, a Bash-compatible command-line interpreter. composer A package-based dependency manager for PHP projects. eslint hub-fork Fork a GitHub repo. The document is a list of dictionaries, where the first and last element is the header and the footer. If one criteria cannot decide between original and duplicate, the next one is tried.
- m: keep lowest mtime (oldest) M: keep highest mtime (newest)
- a: keep first alphabetically A: keep last alphabetically
- p: keep first named path P: keep last named path
- d: keep path with lowest depth D: keep path with highest depth
- l: keep path with shortest basename L: keep path with longest basename
- r: keep paths matching regex R: keep path not matching regex
- x: keep basenames matching regex X: keep basenames not matching regex
- h: keep file with lowest hardlink count H: keep file with highest hardlink count
- o: keep file with lowest number of hardlinks outside of the paths traversed by rmlint.
- O: keep file with highest number of hardlinks outside of the paths traversed by rmlint.
Alphabetical sort will only use the basename of the file and ignore its case.
These files might have been modified and are silently ignored.
By design, some options will not have any effect. If you had 10^73 different files, all the same size, then the chance of a false positive is still less than 1 in a billion. If you want to only find trees with the same hierarchy you should use --honour-dir-layout / -j.
Output is deferred until all duplicates were found.
rmlint uses the mtime to determine the modification timestamp if a checksum is outdated.