All Projects → kaelzhang → Shell Safe Rm

kaelzhang / Shell Safe Rm

Licence: mit
😎 Safe-rm: A drop-in and much safer replacement of bash rm with nearly full functionalities and options of the rm command! Safe-rm will act exactly the same as the original rm command.

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Shell Safe Rm

Tools Osx
A small collection of command line tools for Mac OS X, incl.: clipcat, dict, eject, launch, ql, swuser, trash & with.
Stars: ✭ 576 (+117.36%)
Mutual labels:  command-line, mac, macosx
You Dont Need Gui
Stop relying on GUI; CLI **ROCKS**
Stars: ✭ 4,766 (+1698.49%)
Mutual labels:  command-line, command, mac
blade runner
Blade Runner is a Jamf Pro based Python application that automates and implements a framework to offboard, secure erase and document deprecated Mac systems.
Stars: ✭ 24 (-90.94%)
Mutual labels:  mac, macosx
sloth-app
Sloth desktop app
Stars: ✭ 16 (-93.96%)
Mutual labels:  mac, macosx
Mac Setup
🛠️ Front end web development setup for macOS.
Stars: ✭ 265 (+0%)
Mutual labels:  mac, macosx
Webpack Command
[DEPRECATED] Lightweight, modular, and opinionated webpack CLI that provides a superior experience
Stars: ✭ 218 (-17.74%)
Mutual labels:  command-line, command
Jquery.terminal
jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
Stars: ✭ 2,623 (+889.81%)
Mutual labels:  command-line, command
scoot
Keyboard-driven MacOS cursor actuator
Stars: ✭ 55 (-79.25%)
Mutual labels:  mac, macosx
Dnd Tools
Interactive CLI tools for Dungeons and Dragons 5e
Stars: ✭ 115 (-56.6%)
Mutual labels:  command-line, mac
Mac-OS-Setup-Applications
👾 All I need to setup a new Mac and the applications I use everyday as a Web Developper
Stars: ✭ 96 (-63.77%)
Mutual labels:  mac, macosx
Jsonify
♨️A delightful JSON parsing framework.
Stars: ✭ 42 (-84.15%)
Mutual labels:  mac, macosx
Cliffy
NodeJS Framework for Interactive CLIs
Stars: ✭ 263 (-0.75%)
Mutual labels:  command-line, command
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-52.45%)
Mutual labels:  command-line, command
iOS-AirPrint-for-Mac
enable iOS Airprint Sharing on Mac OS
Stars: ✭ 24 (-90.94%)
Mutual labels:  mac, macosx
Simple
The Simple Intelligent and Modular Programming Language and Environment
Stars: ✭ 120 (-54.72%)
Mutual labels:  command-line, mac
12306-electron
🚄 electron-vue构建12306跨平台(Mac、Windows、Linux)客户端
Stars: ✭ 125 (-52.83%)
Mutual labels:  mac, macosx
HEIC-to-JPG-right-click-converter
HEIC to JPG converter with one click integration into Mac OS X
Stars: ✭ 19 (-92.83%)
Mutual labels:  mac, macosx
Flickr Set Get
A simple command line app to download photos from a flickr set
Stars: ✭ 57 (-78.49%)
Mutual labels:  command-line, command
Simple Console
Add an elegant command-line interface to any page
Stars: ✭ 107 (-59.62%)
Mutual labels:  command-line, command
brewfile
🍎 Brewfile to install softwares in macOS for engineers
Stars: ✭ 37 (-86.04%)
Mutual labels:  mac, macosx
 _______  _______  _______  _______         ______    __   __
|       ||   _   ||       ||       |       |    _ |  |  |_|  |
|  _____||  |_|  ||    ___||    ___| ____  |   | ||  |       |
| |_____ |       ||   |___ |   |___ |____| |   |_||_ |       |
|_____  ||       ||    ___||    ___|       |    __  ||       |
 _____| ||   _   ||   |    |   |___        |   |  | || ||_|| |
|_______||__| |__||___|    |_______|       |___|  |_||_|   |_|

A much safer replacement of bash rm with ALMOST FULL features of the origin rm command.

Initially developed on Mac OS X, then tested on Linux.

Using safe-rm, the files or directories you choose to remove will move to $HOME/.Trash instead of simply deleting them. You could put them back whenever you want manually.

If a file or directory with the same name already exists in the Trash, the name of newly-deleted items will be ended with the current date and time.

Supported options

For those implemented options, safe-rm will act exactly the same as the original rm command

-i, --interactive

-f, --force

-r, -R, --recursive, --Recursive

-v, --verbose

--

Combined short options are also supported, such as

-rf, -riv, etc

Usual Installation

Add an alias to your ~/.bashrc script,

alias rm='/path/to/bin/rm.sh'

and /path/to is where you git clone shell-safe-rm in your local machine.

Permanent Installation

If you have NPM (node) installed (RECOMMENDED):

npm i -g safe-rm

Or normally with make:

make && sudo make install
# and enjoy

For those who have no make command:

sudo sh install.sh

Installing safe-rm will put safe-rm in your /bin directory. In order to use safe-rm, you need to add an alias to your ~/.bashrc script and in all yours currently open terminals, like this:

alias rm='safe-rm'

After installation and alias definition, when you execute rm command in the Terminal, lines of below will be printed:

> rm
safe-rm
usage: rm [-f | -i] [-dPRrvW] file ...
     unlink file

which helps to tell safe-rm from the original rm.

Uninstall

First remove the alias line from your ~/.bashrc file, then

npm uninstall -g safe-rm

Or

make && sudo make uninstall

Or

sudo sh uninstall.sh
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].