Skip to content

zakariaGatter/brash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Brash V0.1.2

Table of Contents

Why Brash

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 ?

About

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

Quick Start

  • 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

Using 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

Preview

List Verbose Restore

Examples

  • 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
    

Help Needed

  • Create a man page for Brash

License

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.