andreafrancia/trash-cli
View on GitHub ↗ ★ 4,623 Python
Command line interface to the freedesktop.org trashcan.
15 mentions on Hacker News by 15 people: 1 story, 14 comments · first 2011-12-03 · latest 2026-01-20
20082026
-
…of trash CLI and a smarter shell program that prevents deleting critical paths would do it. https://github.com/andreafrancia/trash-cli
comment by giancarlostoro · 2026-01-20 · in Running Claude Code dangerously (safely) -
…I can restore trashed files. However, I haven't found a similar solution that works on Termux. [0] https://github.com/andreafrancia/trash-cli
comment by tester457 · 2024-09-20 · in Linux Horror Stories and Protection Spells (Volume I) (2021) -
…suggest you put that into the readme. Otherwise, why should I choose your tool over something like https://github.com/andreafrancia/trash-cli , which seems to already be distributed for the major distros? Does your implementation scratch…
comment by fellerts · 2024-02-20 · in Show HN: A CLI tool that enables you to remove files easily and safely -
For Linux there's [trash-cli]( https://github.com/andreafrancia/trash-cli/ ). Doesn't seem to work for MacOS per this issue ( https://github.com/andreafrancia/trash-cli/issues/284 ), but it suggests to use https://hasseg.org/trash/
comment by plg94 · 2023-03-26 · in The fastest rm command and one of the fastest cp commands -
Reminds me somewhat of trash-cli: https://github.com/andreafrancia/trash-cli
comment by pabs3 · 2022-10-12 · in Show HN: Rmt an alternative to rm with trash written in Rust -
I use trash-cli [0] for that. [0] https://github.com/andreafrancia/trash-cli
comment by BerislavLopac · 2022-09-17 · in $ rm Important.txt (uh oh) -
I use trash-cli which implements the freedesktop trash spec: https://github.com/andreafrancia/trash-cli
comment by cristoperb · 2022-09-17 · in $ rm Important.txt (uh oh) -
…doesn't send it to the "Recycle Bin" or your OS's equivalent, it simply deletes it. Use trash-cli: https://github.com/andreafrancia/trash-cli
comment by pgcj_poster · 2021-04-09 · in You Don't Need a GUI -
…that trash items can be restored even with filename collisions. Then it's trash-put my_file.txt [1] https://github.com/andreafrancia/trash-cli
comment by WCSTombs · 2019-03-17 · in Stop Using `rm` in Bash. Use `del` -
…when I've carelessly `rm`d something I shouldn't have. [0] https://github.com/junegunn/fzf [1] https://github.com/andreafrancia/trash-cli - Command Line Interface to FreeDesktop.org Trash.
comment by insertnickname · 2019-01-14 · in Ask HN: Best things in your bash_profile/aliases? -
…Done? This implements the Freedesktop specification, so is compatible with what KDE and Gnome do. https://github.com/andreafrancia/trash-cli
comment by Symbiote · 2016-04-21 · in NGS: Next Generation Unix Shell -
…one restore-trash command from being recovered. Every so often I trash-empty to free up space. [1] https://github.com/andreafrancia/trash-cli
comment by mintplant · 2016-01-03 · in Accidentally Deleting Everything -
▲ 2
Trash-cli – Command Line Interface to FreeDesktop.org Trashstory by srijan4 · 2014-05-20 · 0 comments
-
ls | grep junk | xargs trash-put https://github.com/andreafrancia/trash-cli/#readme
comment by rcthompson · 2012-05-14 · in A small primer on xargs -
How about replacing rm with something like https://github.com/andreafrancia/trash-cli ? If you only purge the trash when it's necessary and not automatically after every rm, you'd save yourself.
comment by wahnfrieden · 2011-12-03 · in How do I prevent accidental rm -rf /*?