Home » Source Code » A CLI tool to prevent files from deletion - and recover them

A CLI tool to prevent files from deletion - and recover them

2016-05-17 09:46:08
The author
Download(s): 0
Point (s): 1 
Category Category:


Ever deleted a file by mistake with "rm" ?

Even when prompted to?

You can't afford this in production environments.

neverm will move your file(s) to the /tmp/ directory. Never will your file be deleted again.

Not the same story

This is NOT the same as creating an alias in your shell config, like: alias rm='mv $1 /tmp' Why?: neverm.py will store a metadata file along the file removed that will enable this tool to recover it (if needed) to the exact same location where it was removed from, no matter where you are located in the filesystem. neverm will not only move whatever file or directory, it will also not error out when using options like (or any combination of options): rm -rrm -frm -rfrm -fr

The installation process puts neverm.py in /usr/bin/ and then creates the proper aliases in your bashrc and/or zshrc configuration files.

To recover a file, you need to know the exact name and run the 'recover' command.

Examples Remove a file by mistake with any option (-f, -r, -fr, -rf): rm -rf /etc/myfile.txt

Recover it from anywhere in the system to its original location: recover myfile.txt

Regex matching

Just like when you use 'rm' with global RegExes you can do the same with neverm. Ideally, neverm is a tool that will silently work as 'rm' with the added feature of being able to recover your files later. So common removal commands like these will work:

rm -rf temp_*rm -f *.txt

DEB or Source

We are offering deb packages of neverm if you have a Debian or Debian based OS (e.g. Ubuntu). but if you have a different type of OS you can grab the source and install neverm yourself.

You will need to copy neverm.py to /usr/bin/ and then run install.sh which will place the correct alias lines in either your bashrc or zshrc configuration files.

Bugs and Requests

Please submit any bugs or enhancement requests to our issues page

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
Sponsored links


(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

A CLI tool to prevent files from deletion - and recover them (9.98 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points


Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com


CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D