TRASH-PUT(1)

πŸ“¦
version 0.26.9.29 Β· 4 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… TRASH-PUT(1) β€” the manual page, but make it make sense

okay bestie, welcome to trash-put, from the General Commands Manual section. it's the command line trash utility and it's literally about to change your whole terminal life. let's get into it πŸ—‘οΈβœ¨


✨ NAME ✨

trash-put β€” Command line trash utility. that's it, that's the name, and it ate πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

trash [OPTION] ...  [ARGUMENTS] ...
trash-put [OPTION] ...  [ARGUMENTS] ...

two ways in, same energy. pick your fave 🫢


🌸 DESCRIPTION 🌸

so the Trash-cli package gives you a whole command line interface trashcan utility, and it's compliant with the FreeDesktop.org Trash Specification β€” yes, actual spec, actual standards, we love a girl who follows the rules. πŸ‘‘

and the way it's thoughtful?? it remembers the name, original path, deletion date, and permissions of each trashed file. so when you go to restore something later you're not just digging through a mystery pile. she kept receipts, fr fr. πŸ“

now, where do the files actually go? depends on where they came from:

Files trashed from the home partition end up in either:

  • $XDG_DATA_HOME/Trash
  • or ~/.local/share/Trash/ (and that second one is used if $XDG_DATA_HOME is not defined or empty)

Files trashed from other partitions go to one of these two places:

  • $top_dir/.Trash/$uid
  • $top_dir/.Trash-$uid

and because i know you're gonna ask what those mean:

  • $top_dir is the mount point of the volume containing the file to be removed
  • $uid is the numeric ID of the deleting user
heads up on the picking logic: the first option, $top_dir/.Trash/$uid, works only when the .Trash dir has the sticky bit set. the second option, $top_dir/.Trash-$uid, is used when the first is not viable. so it's a fallback situation, not a choose-your-own-adventure 🧚

πŸŽ€ ARGUMENTS πŸŽ€

  • Names of files or directories to move to the trash can. that's the whole vibe. you hand her stuff, she trashes it. iconic behavior honestly. πŸ’–

πŸ‘‘ OPTIONS πŸ‘‘

  • -f β€” silently ignore any files or directories that do not exist. no error messages printed, and no nonzero status returned to the caller because of any such nonexistent arguments. so if it's not there, she's just not gonna make it a whole thing. drama-free. πŸ™ˆ
  • -h, --help β€” show help message and exit. classic. 🫢
  • --trash-dir=TRASHDIR β€” use TRASHDIR as the trash folder. you pick the spot, she respects the spot. ✨
  • -v, --verbose β€” explain what is being done. she will narrate. commentary mode activated. πŸ—£οΈ
  • --version β€” show the program's version number and exit. 🏷️

🌈 EXAMPLES 🌈

$ trash-put foo   # trashes foo

look at that. one line. foo is gone. slay. πŸ’…


πŸ’€ BUGS πŸ’€

found something cursed? please, report bugs to https://github.com/andreafrancia/trash-cli/issues. the maintainers wanna know, bestie, don't gatekeep πŸ›


πŸ’– IF YOU WANT SAY THANKS πŸ’–

feeling grateful? the options are:

yes the link is that long. copy it carefully. 😭


🌟 CREDITS 🌟

  • Trash was written by Andrea Francia <andrea@andreafrancia.it>
  • The original version of trash-empty was contributed by Einar Orn Olason <eoo@hi.is>
  • The first version of manual pages was written by Steve Stalcup <vorian@ubuntu.com> and was modified by Massimo Cavalleri <submax@tiscalinet.it>

legends, all of them, no cap 🫑


πŸ”₯ SEE ALSO πŸ”₯

Both are released under the GNU General Public License, version 2 or later. πŸ“œ


and that's the whole page, bestie πŸŽ€ footer says TRASH-PUT(1) and it's a General Commands Manual situation β€” go forth and trash responsibly, you absolute main character πŸ’œ