CentOS Build Recycle Bin

Source: Internet
Author: User

The Recycle Bin under Linux is in each of the current user directories./local/share/trash.

You can also add a recycle Bin to Linux.

Mkdir/tmp/trash_tmp Creating a Recycle Bin directory

Vi/bin/trash Editing a file

MV [email protected]/tmp/trash_tmp

: Wq Save Exit

Alias Rm=/bin/trash adding aliases

Vi/etc/bashrc

Add alias Rm=/bin/trash on the last line

chmod 755/bin/trash

chmod 777/tmp/trash_tmp

SOURCE/ETC/BASHRC Enabling environment variables

If you really want to delete a file, use/bin/rm-i file_name

This allows a recycle Bin to be built, and will automatically move the file_name to the/tmp/trash_tmp/directory when using RM

CentOS Build Recycle Bin

Related Article

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.