Skip to content
Simple CLI tool for removing files.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
t.py

README.md

t

Simple CLI tool for removing files.

Motivation

I make mistakes, but I don't want one of those mistakes to be accidentally permanently deleting an important file. I spend much of my computer time in the terminal, but rm can be a dangerous thing. There are already tools that seek to remedy this problem; t is another one.

t is designed for interactive use, and incorporates more protections for this usecase than safe-rm. At the same time, it is much simpler than larger projects like trash-cli.

Features

  • Incorporates directory blacklist like safe-rm to avoid deleting important system directories.
  • Prompts user for confirmation before removing multiple items.
  • Keeps deleted items for a configurable number of days before automatically permanently deleting them. Permanent deletion requires the -f flag and prompts for confirmation.
  • Only deletes multiple files if no error occurs with any one of them.

Usage

usage: trash [-rf] <files>...

options:
  -f  Delete files forever.
  -r  Recursively remove directories.

License

MIT - see the LICENSE file.

You can’t perform that action at this time.