| Crates.io | leave |
| lib.rs | leave |
| version | 0.1.0 |
| created_at | 2025-11-30 02:05:39.067704+00 |
| updated_at | 2025-11-30 02:05:39.067704+00 |
| description | Inverted rm(1) command - Remove everything except the given files |
| homepage | |
| repository | https://github.com/kdkasad/leave |
| max_upload_size | |
| id | 1957745 |
| size | 76,399 |
leave is an inverted rm command. It removes everything in the current directory except the files given as arguments.
Example:
$ ls
main.rs other.rs test.rs
$ leave main.rs
$ ls
main.rs
Install from Git sources using Cargo:
$ cargo install --git https://github.com/kdkasad/leave
$ leave --help
Usage: leave [OPTIONS] [FILES]...
Arguments:
[FILES]... Files to leave present
Options:
-C, --chdir <DIR> Run as if started in <DIR>
-r, --recursive Recursively delete directories and their contents
-d, --dirs Delete empty directories
-f, --force Don't check for arguments that are likely to be mistakes
-h, --help Print help
-V, --version Print version
Copyright (C) 2025 Kian Kasad (@kdkasad)
Leave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Leave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Leave. If not, see https://www.gnu.org/licenses/.