trashcan or trash can

Read about trashcan or trash can, The latest news, videos, and discussion topics about trashcan or trash can from alibabacloud.com

Fedora: delete files from the command line to the recycle bin.

"Xdg_videos_dir = "$ home/videos" Add the desktop directory, log out of the user, and then log on. To prevent such accidental deletion in the future, I have to find a way to delete all the files to the recycle bin.Then I went to the Internet to find three methods.(1) Use trash-CLI:This software operates the recycle bin under the command line (its directory is ~ /. Local/share/trash/files ).Installation (in

Centos rm Recycle Bin

Centos rm Recycle Bin After linux rm deletes a file, it is troublesome to restore it. Even if it is restored, the file name format is changed to a string of numbers. Modify the environment variable of the root user Vi ~ /. Bashrc Comment out the alias for line 1 # Alias rm = 'rm-I' Add the following content to the last line: Mkdir-p ~ /. Trash Alias rm = trash Alias r =

Linux system prevents accidental deletion of files

1.PrefaceOnce Upon a while, a rm-rf/useless/* command took out the files we needed, and the entire system was killed ,This is not with tears.such as the use of the RM command mistakenly delete the file, we will notice, but we can not guarantee that it will not happen, after all, there is always an accident, then for this situation we are not bound without policy, no! We have a corresponding solution, that is, the use of trash-cli. 1.1

The rm command in CentOS is transformed into Moving files to the recycle bin.

dangerous, especially when it comes with-rf parameters, it must be careful, but Tigers also have a nap, so why not give rm a dose of regret! After constantly searching on the Internet, I found a section to transform the rm command to move the file to a specified recycle bin directory, and then I can view the files in the recycle bin directory, then, you can clear the recycle bin directory to completely delete a piece of code from the file. the original source of this short code is no longer wel

Openwares | open source and free matters» added the recycle bin function for the RM command

Openwares | open source and free matters» added the recycle bin function for the RM command Add the recycle bin function for the RM command March 11th, 2011 Openwares Leave a comment Go to comments Rm is a powerful command, especially Rm-RF, which is sometimes powerful enough to make you cry. It's easy to clear all the files and directories in the current directory.$ SudoRm-RF./* It's okay, but if you do not care about it$ SudoRm-RF/* Sorry, bro!There are also a variet

79.JAVA Programming Ideas--abstract applications

79.JAVA Programming Ideas--abstract applications1 Abstract ApplicationsNext, consider the rest of the design-where to use the class? Since the way the bins are categorized is very indecent and too revealing, why not isolate the process and hide it in a class? This is the famous "If you must do something indecent, at least localize it into a class" rule.Now, as long as a new type of trash join method, the initialization of the Trashsorter object must b

Ubuntu under RM instructions redirection

1. Install TRASH-CLI sudo apt-get install trash-cli2. Set up the script sudo gedit/usr/local/bin/trash-rm Copy #!/bin/bash # command name:trash-rm shopt-s extglob recursive=1 declare-a cmd ((i = 0)) for F In "$@" does case "$f" in (-* ([Fiiv]) r* ([Fiiv]) |-* ([Fiiv]) r* ([Fiiv])) tmp= "${f//[rr]/}" if [-N " $tmp "] then #echo" \ $tmp = = $tmp " cmd[$i]=" $

Transform RM commands under Linux to move files to Recycle Bin "go"

directory, then you can view the file in the Recycle Bin directory, and then empty the Recycle Bin directory to completely delete the file of a piece of code, this short code of the original source has not been refined, But in the spirit of a single lele is not as many Lele to share it out! Mkdir-p/.trash #创建一个目录作为回收站, where the user's home directory is used. Trash Directory alias Rm=

Realize Double Dispatch

Remember that polymorphism can only be represented by method calls, so if you want to make the double dispatch correct, you must perform two method calls: In each structure, one is used to determine the type. In the trash structure, a new method is invoked to invoke Addtobin (), which takes a parameter that is an array composed of Typebin. The method will iterate through the array, trying to add itself to the appropriate garbage cans, where the doubl

Analog garbage Collection Station

The essence of the problem is that if you throw rubbish into a single trash bin, it is actually unclassified. But in the future, some special information must be restored so that the rubbish is properly categorized. In the first solution, Rtti played a key role (see chap. 11th). This is not a common design because it adds a new limit. It is this restriction that makes the problem very interesting-it is more like the very troublesome problems we encou

Windows Mount Gluster replicated volumes

mistakeTrash Translator for GlusterFSHere is the main introduction of the function of Trash translator, Trash translator to remove from the glusterfs volume of files to provide a temporary storage place, is equivalent to the deleted files to provide a recycle Bin, can help users get and recover data that is temporarily deleted. Each block retains a hidden directory. Tr

Implementation of the recycle bin function in Linux

Implementation of the recycle bin function in Linux This document describes how to use the Bash script to delete files or directories in Linux based on the Windows recycle bin function. Create a delete script instead of the rm command. This script implements the following functions: directly delete files or directories larger than 2 GB; otherwise, put them in the $ HOME/trash directory; restore the deleted files in the

The application of abstraction

To get to this point, it's time to think about the rest of the design-where do you use classes? Since the method of classifying to the dustbin is very indecent and too revealing, why not isolate the process and hide it in a class? This is the famous "If you have to do something indecent, you should at least localize it into a class" rule. It looks just like the following: Now, as long as a new type of trash is added, the initialization of the Trash

Linux Installation Recycle Bin tool __linux

On Linux mistakenly deleted files is a very scary thing, but there are trash-cli is not afraid of 1. Determine if Git is installed on the system [Root@localhost ~]# git--versiongit version 1.7.1[Root@localhost ~]# Install git if not installed [Root@localhost ~]# Yum Install Git-core2. Cloning trash-cli to local [Root@localhost local]# git clone https://github.com/emanon-was/

Modify RM command under Linux to prevent accidental deletion

Preface: I believe many friends have encountered in the Linux under the RM command mistakenly delete files, the heart of the moment as if there are countless alpaca in the Pentium. So how do you prevent this from happening? Of course there is a way, we can write a shell script, change the role of the RM command. The first step:First in the home directory to create a directory called Username name (of course, the name can be customized), the specific command is:sudo mkdir username (custom name)At

Disable RM command, use MV command to set up Recycle Bin for Linux

Tags: Linux Recycle Bin Script sourceConvert RM command to MV Command, cannot use the-R parameter, will report an error, because the MV command does not have the-R parameter, the following is the method: Create a hidden folder in the user's home directory ~/.trash as the garbage collection station[[emailprotected] shellXT]# mkdir -p ~/.trash Write a script #设置别名, RM is delete file, RL is v

In linux, the rm command is modified to prevent accidental deletion, and the linuxrm command is deleted by mistake.

In linux, the rm command is modified to prevent accidental deletion, and the linuxrm command is deleted by mistake. I believe many of my friends have experienced the accidental deletion of files by using the rm command in linux. At this moment, there are countless alpaca in their hearts. How can this problem be prevented? Of course there are methods. We can write a shell script to change the role of the rm command. Step 1: First, create a directory named username under the home Directory (of cou

How to move files to the Recycle Bin using the RM command in Linux

MV command does not have the-R parameter, the following is the method:The principle is to create a hidden folder in the user's home directory ~/.trash as the garbage collection station.The code is as follows:Mkdir-p ~/.trashVI ~/.BASHRCThen write the following code to ~/.BASHRC and save it.The code is as follows:Alias rm= ' Trash 'Alias Rl= ' Trashlist 'Alias ur= ' Undelfile '#替换rm指令移动文件到 ~/.

Linux Recycle Bin

A small feature that prevents users from using RM#!/usr/local/bin/python3# coding:utf-8# Create your views here.# =================================================== =# author:chang-email:[emailprotected]# last modified:2017-06-20# filename:linuxsafe.py# description:linux SAF E js, base# blog:http://www.cnblogs.com/changbo# ==================================================== "" "1, Initialize user environment alias rm= ' mv--verbose-f--backup=numbered--target-directory/tmp/

Let's get ourselves a recycling station and play.

See a post today, tell me how to recover the data after it was mistakenly deleted. In the back of the thread found a more interesting thing, his exact words are like this:I thought it was fun, so I decided to try it out myself.First to build a directory to do the Recycle Bin, I chose to build a trash hidden folder in the root directory as the Recycle Bin: mkdir/.trashTake a look at the established Recycle Bin: ll-a/|grep. TrashThen I checked the MV us

Total Pages: 15 1 .... 4 5 6 7 8 .... 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.