Remove files or directories.

Related tags

Command-line wrm
Overview

Wrm - Remove files or directories

workflow_build Crates.io Version

Installation

Run the following Cargo command:

cargo install wrm

Usage

To move files to trash($HOME/.local/share/wrm/trash):

wrm foo bar ...

To destroy files:

wrm --destroy ~/.local/share/wrm/trash/foo ~/.local/share/wrm/trash/bar ...

To restore files in trash to where they came from:

wrm --restore ~/.local/share/wrm/trash/foo ~/.local/share/wrm/trash/bar ...

To list all files and directories in trash:

wrm --list

To delete all files and directories in trash permanently:

wrm --empty

Options

-n, --noninteractive  Do not prompt whether to change destinations
-q, --quiet           Do not print log messages
-h, --help            Print help
-V, --version         Print version

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

TODO

  • Add shell completions
  • Add auto empty
  • Multiplatform support
  • Optimize performance
You might also like...
Bookmark directories for easy directory-hopping in the terminal
Bookmark directories for easy directory-hopping in the terminal

markd Bookmark directories for easy directory-hopping in the terminal. All it takes is one command markd to bookmark your current directory, or use th

Utility to display a tree view of directories.

TreeCraft v0.2.3 (16 October 2023) TreeCraft is a command-line utility written in pure Rust that helps you visualize directory structures in ASCII for

A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

CLI Tool for tagging and organizing files by tags.

wutag 🔱 🏷️ CLI tool for tagging and organizing files by tags. Install If you use arch Linux and have AUR repositories set up you can use your favour

mdBook is a utility to create modern online books from Markdown files.

Create book from markdown files. Like Gitbook but implemented in Rust

CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

The dead easy way to use config files in your rust project

Configr The dead easy way to use config files in your project This will load a config.toml file if it exists, otherwise it will create the needed fold

 miniserve - a CLI tool to serve files and dirs over HTTP
miniserve - a CLI tool to serve files and dirs over HTTP

🌟 For when you really just want to serve some files over HTTP right now!

Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files

RouterOS-Backup-Tools Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files Usage examples Info cargo run -- info -i MikroTik.backup D

Comments
  • 'delete' does not remove an entry from files.json

    'delete' does not remove an entry from files.json

    to reproduce

    $ touch foo bar
    $ wrm remove foo
    
    # from README.md, it does not work
    # It must be specified with the full trash path instead.
    $ wrm delete foo
    error: 'foo' no such file or directory
    
    $ wrm delete ~/.config/wrm/trash/foo
    
    # error occurred because the entry is still in ~/.config/wrm/files.json
    $ wrm list
    error: '~/.config/wrm/trash/foo' no such file or directory
    

    Have you checked to see if it works properly? I would also like to mention that recording information in a single file in ~/.config/wrm/files.json may cause a race condition problem when deleted in parallel. (Advisory locking would be necessary if saving to a single file.)

    BTW, What is the motivation for developing this CLI? Compared to the myriad of CLIs that already exist, there does not seem to be a single unique feature.

    I tell you this because you may not know that these tools are already available.

    most famous one https://github.com/andreafrancia/trash-cli

    written in Rust, can install by cargo https://github.com/oberblastmeister/trashy https://github.com/TD-Sky/conceal

    If you knew they existed, I would recommend writing what makes it better than these.

    bug 
    opened by gifuhabu 2
Owner
null
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022
RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions

RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions. Features Batch rename files and direct

Ismael González Valverde 219 Dec 31, 2022
Temporary files and directories with UTF-8 paths.

camino-tempfile A secure, cross-platform, temporary file library for Rust with UTF-8 paths. This crate is a wrapper around tempfile that works with th

null 4 Apr 24, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
Command line utility to remove duplicates from the given input.

Command line utility to remove duplicates from the given input. Note that huniq does not sort the input, it just removes duplicates.

Karolin Varner 189 Dec 27, 2022
Find and clean heavy build or cache directories.

ProjClean Find and clean heavy build or cache directories. ProjClean finds directories such as node_modules(node), target(rust), build(java) and their

null 42 Sep 25, 2022
Tool for managing dotfiles directories; Heavily based on rcm.

Paro paro : to prepare, get ready / set, put / furnish, supply. Tool for managing dotfiles directories; Heavily based on rcm. TODO Rust Boilerplate CI

Rafael Delboni 7 Nov 20, 2022
Quickly find all blackhole directories with a huge amount of filesystem entries in a flat structure

findlargedir About Findlargedir is a tool specifically written to help quickly identify "black hole" directories on an any filesystem having more than

Dinko Korunic 24 Jan 1, 2023
Semi-persistent, scoped test directories

Semi-persistent, scoped test directories This crate aims to make it easier to use temporary directories in tests, primarily by calling the testdir!()

Floris Bruynooghe 4 Nov 19, 2022
Wraps cargo to move target directories to a central location [super experimental]

targo Wraps cargo to move target directories to a central location [super experimental] To use, cargo install --git https://github.com/sunshowers/targ

Rain 18 Jan 7, 2023