Well, why not. As you see its similar to Trash_cli. Unlike Trash_cli, Brash don't Depends on any Python libs just Bash Scripting.
So why not ?
Brash Cli Trash Manager full in Bash
Brash allows you to...
- Delete files and folders, even the ones start with "-"
- List out Trash contant
- Clean Trash
- Restore files from trash
- Nice progress viewer of what happened
- Use regular expressions
Brash can automatically...
- Rename existing files during Delete or Restore
- Create a trash Folder in Removable Devices
-
Installation requires :
Probably you just need Dialog
-
Set up Brash:
git clone https://github.com/zakariaGatter/brash.git ~/brash cd ~/brash git checkout tags/v0.1.2 mkdir -p ~/.local/bin cp bin/brash ~/.local/bin chmod +x ~/.local/bin/brash
Brash-0.1.2: Cli Trash Manager in Pure Bash
USAGE: brash [OPTIONS] ... files ...
OPTIONS:
-d <files> Move to Trash the giving files
-r Restore Files and Directories from Trash
-l List of Deleted files
-c Clean Trash Bin
--date Sort the Resoult by Date
--file Sort the Resoult by file name
-s Calculate Trash size
-i Ask before every remove
-I Ask once before removing more than three files
-v Explaine what been done
-h Display this help dialog
-V Display Version
NOTE:
Format for '--date' option is (YYYY-MM-DD) or human readable date string
See: 'man date' for more information.
Options
(--date/--file) options work only with -c,-l,-r Main Options
-
Delete file or Directory (Add '-v' for verbose)
$ brash -d EX $ brash -d EX* $ brash -d EX/* $ brash -dv EX/[A-Z]*
-
Restore file from Trash (Add '-v' for verbose)
$ brash -r $ brash -r --date "2022-05-05" $ brash -r --file vimrc.bk viminfo init.lua
-
Show list of files in trash
$ brash -l $ brash -l --date "yesterday" $ brash -l --file code[1-9].py
-
Clean Trash (Delete permanently)
$ brash -c $ brash -c --date "week ago" $ brash -c --file *.db
-
Show Trash size
$ brash -s
- Create a man page for Brash
MIT License Copyright (c) 2019 Zakaria Barkouk The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.