Multiplatform drop in replacement for GNU rm
with extra features
This project is a close port of GNU rm
. The idea is extending the functionality around rm
API and bring some niceties with improved performance, specially for large files and deeply nested directories.
rm
api-t
)Benches are defined here
cargo bench
| remove | rmx | rm | rsync | |----------------------------|-----|----|-------| | files |5.6285ms|14.201ms|786.72ms| | recursively nested folders |6.1517ms|14.732ms|714.86ms| | multiple deeply nested folders |6.3199ms|14.624ms|294.71ms| | multiple deeply nested folders (rip mode) |4.5762ms|14.079ms|274.99ms|
numbers obtained on a XPS 13 9300, at commit: cace6812
rmx --rip node_modules
dir
├── dir2
│ ├── dir3
│ ├── dir4
│ │ ├── file1
│ │ └── file5
│ ├── file1
│ ├── file3
│ └── file4
├── file1
└── file2
rmx --flatten 1 dir
dir
├── dir2
│ ├── dir4
│ │ └── file1 # name conflicts are skipped
│ ├── file1
│ └── file5
├── file1
├── file2
├── file3
└── file4
rmx file1 file2 -t
Currently only obtainable via crates.io and this repo.
cargo install rmx
Put in your favorite Shell rc file:
alias rm='rmx'
rm
and the underlying system calls are not the same.rmx
improves the computation load. I/O might still be your biggest bottleneck.