Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Nicolas MAILLET
Small_tips
Commits
a95b4079
Commit
a95b4079
authored
Oct 07, 2016
by
Nicolas MAILLET
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creation of readme.md
parent
7bcc7f73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
trash/readme.md
trash/readme.md
+18
-2
No files found.
trash/readme.md
View file @
a95b4079
$ sudo pip install cheat
## What to do
First, create a
```.Trash```
directory in your home if you don’t have one:
```
bash
mkdir
.Trash
```
Then, you just have to create an alias of
```rm```
:
```
bash
nano .bashrc
function
rm
()
{
mv
"
$@
"
~/.Trash/
;
}
```
To clear the
```.Trash```
folder, you can create a second alias:
Source: https://github.com/chrisallenlane/cheat
\ No newline at end of file
```
bash
nano .bashrc
function
rrm
()
{
/bin/rm
-rf
~/.Trash/
*
;
}
```
When you really want to delete big files, you don’t want to move them first into
```.Trash```
, because it can be pretty long.
So instead of the classical
```rm -rf```
, just run
```/bin/rm -rf```
. It is a bit more difficult but at least you wont do it by mistake (hopefully)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment