Skip to content

Commit

Permalink
Merge pull request #7 from MikeDacre/dev
Browse files Browse the repository at this point in the history
Increment version to beta-5
  • Loading branch information
MikeDacre authored Mar 6, 2018
2 parents 023004e + a144689 commit 00fa98e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Careful rm

Version: 1.0-beta5

A wrapper for rm that adds more useful warnings and an optional recycle/trash mode

Can be used as a drop-in replacement for `rm` on any Linux or MacOS system with
Expand All @@ -14,6 +16,9 @@ MacOS, otherwise the best trash location is chosen (see below). Most files can
be restored using GUI tools (e.g. Nautilus/Finder), as the default Trash
folders and metadata are used (e.g. *Put Back* works on Mac).

Note: passing `-s` will result in files being destroyed with `shred` and will
forcibly override and disable recycle mode.

Ideally, this tool should be symlinked to `rm` and the file
`~/.rm_recycle_home` should be created, which will make recycling automatic
only for files in your home directory. This will provide a great deal of safety
Expand All @@ -28,6 +33,8 @@ Arguments
---------
-c, --recycle move to trash instead of deleting (forced on by
~/.rm_recycle)
-s, --shred run shred on all files (recursively if directories
included) prior to deleting, override recycle
--direct force off recycling, even if ~/.rm_recycle exists
--dryrun do not actually remove or move files, just print
-h, --help display this help and exit
Expand Down
6 changes: 5 additions & 1 deletion careful_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
this is the best option for Linux, where recycling all files isn't a great
idea.
Passing -s or --shred will invoke shred on every file prior to removing them
and will disable recycle mode. Passing --direct will force disable recycle
mode without enabling shred.
Note: splits files, directories, and other non-files (e.g. sockets) and
handles them separately. non-files are always deleted with rm after checking
with the user.
Expand Down Expand Up @@ -65,7 +69,7 @@
# For old versions of python 2
input = raw_input

__version__ = '1.0b4'
__version__ = '1.0b5'

# Don't ask if fewer than this number of files deleted
CUTOFF = 3
Expand Down

0 comments on commit 00fa98e

Please sign in to comment.