Secure use of rm commands in linux

Source: Internet
Author: User
In linux, use the secure rm command-Linux general technology-Linux technology and application information. The following is a detailed description. Secure use of rm commands in linux
When the linux GUI terminal console is started, shell only loads. bashrc
When logging on as a login shell, the shell loads. bashrc and. profile
Preparation
In ~ Create a recycle bin directory under the Directory
Mkdir ~ /. Recycle_bin
Add at the end of. bashrc
# Rm one file and not support program files :(
_ Rm ()
{
Mv $1 ~ /. Recycle_bin
}
# Create a command shortcut key and use the del command to delete the key later
Alias del = _ rm
# When rm is used, the system first prompts whether to delete the file.
Alias rm = "rm-I"

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.