A trash files and directories management tool for Linux command line.
- Remove files and directories by moving them in to a trash bin
- Retrieve files and directories by moving them out of trash bin to original path
- Redirect the files or directories to un-remove to the retrieving target location
- List all items in trash bin
- Search for items in trash bin
- User isolation: different users have their own trash bin which doesn't interfere with each other. Root users can see all trash items.
- Auto clearance of trash bin
- Command completion for trash items
To execute go tests:
make test
git clone https://github.com/Troublor/go-trash.git
cd go-trash
make install
This commands will install gotrash
at ~/bin
If you want to install gotrash
in another place, do export CMD_PATH=<another folder>
before make install
GOTRASH_PATH is the base directory to hold data of gotrash
. The default GOTRASH_PATH
is /etc/gotrash
for root
users, and $HOME/.gotrash
for other users.
You can do export GOTRASH_PATH=<an empty folder>
before make install
to specifiy GOTRASH_PATH
. This will make all
users' GOTRASH_PATH
the same as what you specified.
To uninstall gotrash, just simply delete the GOTRASH_PATH
folder and the gotrash
command file.
** Note that this will permanently delete any trash in the trash bin.**