This commit is contained in:
parent
859b3cdfa0
commit
68d9e77225
20
.drone.yml
20
.drone.yml
@ -16,7 +16,7 @@ steps:
|
||||
- ls -la $HOME/.trash/
|
||||
- type trash
|
||||
|
||||
- name: test trash-empty
|
||||
- name: test trash_empty
|
||||
depends_on:
|
||||
- install
|
||||
image: ubuntu:latest
|
||||
@ -26,12 +26,12 @@ steps:
|
||||
- ls -l /tmp/testfile*
|
||||
- trash /tmp/testfile*
|
||||
- ls -l /tmp/testfile*
|
||||
- trash-list
|
||||
- trash_list
|
||||
- ls -la $HOME/.trash/
|
||||
- trash-empty
|
||||
- trash_empty
|
||||
- ls -la $HOME/.trash/
|
||||
|
||||
- name: test trash-restore
|
||||
- name: test trash_restore
|
||||
depends_on:
|
||||
- install
|
||||
image: ubuntu:latest
|
||||
@ -41,13 +41,13 @@ steps:
|
||||
- ls -l /tmp/testfile*
|
||||
- trash /tmp/testfile*
|
||||
- ls -l /tmp/testfile*
|
||||
- trash-list
|
||||
- trash_list
|
||||
- ls -la $HOME/.trash/
|
||||
- trash-restore
|
||||
- trash_restore
|
||||
- ls -l /tmp/testfile*
|
||||
- ls -la $HOME/.trash/
|
||||
|
||||
- name: test trash-rm
|
||||
- name: test trash_rm
|
||||
depends_on:
|
||||
- install
|
||||
image: ubuntu:latest
|
||||
@ -57,8 +57,8 @@ steps:
|
||||
- ls -l /tmp/testfile*
|
||||
- trash /tmp/testfile*
|
||||
- ls -l /tmp/testfile*
|
||||
- trash-list
|
||||
- trash_list
|
||||
- ls -la $HOME/.trash/
|
||||
- trash-rm testfile2 testfile3
|
||||
- trash-list
|
||||
- trash_rm testfile2 testfile3
|
||||
- trash_list
|
||||
- ls -la $HOME/.trash/
|
12
README.md
12
README.md
@ -5,7 +5,7 @@
|
||||
## Installation:
|
||||
Place the file in your desired path and it in your $HOME/.bashrc or in /etc/.bashrc:
|
||||
|
||||
source /path/to/trash.sh
|
||||
. /path/to/trash.sh
|
||||
|
||||
Add cleanup job to your cron:
|
||||
|
||||
@ -15,8 +15,8 @@ Add cleanup job to your cron:
|
||||
## Usage:
|
||||
As the Script runs it first checks if $HOME/.trash/ (your trash bin) in your home dir exists and creates it if missing.
|
||||
|
||||
- `trash FILE1 DIR2 ...` or `trash-put FILE1 DIR2 ...` to move files and directories with relative or absolute paths to your .trash
|
||||
- `trash-list` to list all files and dirs that you put in the trash in the last 30 days
|
||||
- `trash-empty` to remove all files and dirs in your trash
|
||||
- `trash-rm FILE1 DIR2 ...` to delete specific files and directories in your trash
|
||||
- `trash-restore FILE1 DIR2 ...` to restore specific files and directories from your trash to it's origin
|
||||
- `trash FILE1 DIR2 ...` or `trash_put FILE1 DIR2 ...` to move files and directories with relative or absolute paths to your .trash
|
||||
- `trash_list` to list all files and dirs that you put in the trash in the last 30 days
|
||||
- `trash_empty` to remove all files and dirs in your trash
|
||||
- `trash_rm FILE1 DIR2 ...` to delete specific files and directories in your trash
|
||||
- `trash_restore FILE1 DIR2 ...` to restore specific files and directories from your trash to it's origin
|
||||
|
Loading…
Reference in New Issue
Block a user