Skip to content

CLI trash can for Linux that can interact with the desktop trash folder, and permanently delete files after x number of days

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

blah1898/rmw

 
 

Repository files navigation

rmw (ReMove to Waste) functions as a command line recycle bin/trash can
utility. Optionally, it can ReMove files to Desktop trash, restore files,
list files to be selected for restore, and purge (permanently delete)
files that were trashed x number of days ago.

Web site: https://github.com/andy5995/rmw/wiki

This is the README for the development version of rmw. It may mention
features that aren't included in the last release, or differ in other ways.
The README from the last release is at
https://github.com/andy5995/rmw/blob/v2016.09.04.01a/README

After rmw is installed, create the user configuration directory by typing
'rmw' and hitting enter. Afterward, it's recommended to copy /etc/rmwrc (or
/usr/local/etc/rmwrc) to $HOME/.config/rmw and then rename it to 'config':

'cd ~/.config/rmw'
'~/.config/rmw$ cp /etc/rmwrc .'
'~/.config/rmw$ mv rmwrc config'

Then edit the file to suit your needs.

At some point, rmw will automatically create a 'lastpurge' and 'lastrmw'
in that same directory.

== Configuration File ==

Documentation explaining the configuration can be found in 'rmwrc', and
extra examples in 'rmwrc_config_example'.

Waste folders will be created automatically. (e.g. if '$HOME/trash.rmw'
is listed in the config file, these 3 directories will be created:
$HOME/trash.rmw
$HOME/trash.rmw/files
$HOME/trash.rmw/info

== Purging ==

If purging is 'on', rmw will permanently delete files from the folders
specified in the configuration file after 'x' number of days. Purging
can be disabled by using 'purgeDays = 0' in configuration file. rmw will
only check once per day if it's time to purge (use -g to check more often).
Purge requires -f (--force) to run.
The day of the last purge is stored in $HOME/config/rmw/lastpurge

== Options ==:

-c, --config filename     use an alternate configuration
-l, --list                list waste directories
-p, --pause               wait for a keypress before exiting
-g, --purge               run purge even if it's been run today
-f, --force               allow purge to run
-i, --interactive         not implemented
-r, --recurse             not implemented
-z, --restore <wildcard filename(s) pattern>
-s, --select              select files from list to restore
-u, --undo-last           undo last ReMove
-B, --bypass              bypass directory protection
-v, --verbose             increase output messages
-w, --warranty            display warranty
-V, --version             display version and license information

== -z option ==

While -z can restore files at the command line, you have to specify
the full path (wildcards ok).
Example: rmw -z ~/.trash.rmw/files/*.iso

The other way is to be in the WASTE/files/ folder; from there, only the
basename is needed.

Note: If <basename> is given as an option, and the file isn't in your
present working directory, rmw will search through all your WASTE folders,
and restore it if found.

== Protected directories ==

explained:
if 'PROTECT = /home/andy' is specified in the config file, /home/andy, and
all dirs and files beneath it will be "protected". This warning will show
up:

"File is in protected directory: <filename/dir>"

And it will not get rmw'ed

WASTE folders and the rmw configuration/data directory are protected by
default (there is no need to add a 'PROTECT =' line for them.


This file was last updated 2016-09-15

About

CLI trash can for Linux that can interact with the desktop trash folder, and permanently delete files after x number of days

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • C 69.4%
  • Shell 29.4%
  • C++ 1.1%
  • M4 0.1%