Ubuntu Repair the RM command to remove files to the Recycle Bin

Source: Internet
Author: User

Delete Files to Recycle Bin under Ubuntu

I believe there are many students and I, as a result of the habit of the RM command, several times accidentally deleted the important files of the painful experience!

Target: the deleted files will be placed in the system Recycle Bin, location: ~/.local/share/trash/files

The first step:

#安装trash-CLI tool is actually the command-line mode of the Recycle Bin:

$ sudo apt-get Install TRASH-CLI


Step Two:
#给trash命令添加别名 "RM", overwriting system RM command

$ VI ~/.profile

#在最后一行加入:

Alias rm="trash"

#保存并退出

$ source ~/.profile

You do not have to delete the folder when you add the parameter-R directly using the RM file or RM filedirectory

Delete the file or folder and delete it, it will automatically run to the Recycle Bin!

Ubuntu Repair the RM command to remove files to the Recycle Bin

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.