Linux Delete soft Connect

Source: Internet
Author: User

today to/etc to create a link, delete the soft link, resulting in the deletion,/etc/under the file is all gone.

This article was collected.

1. Create a soft connection

[[email protected] home] # ln-s/usr/soft//home/soft_link

2. Error removing soft connection

[[email protected] home] # rm/home/soft_link/rm: Cannot delete "/home/soft_link/": is a directory

3. The correct way to remove a soft connection

[[email protected] home] # rm/home/soft_link/rm: Cannot delete "/home/soft_link/": is a directory [[email protected] -linux Home]#  rm/home/soft_link"/home/soft_link"? Y

4, just delete the soft connection file (the correct way)

[[email protected] home] # Rm-rf/home/soft_link [[email protected] home] # ll/usr/soft/ Total dosage 4-rw-r--r--1 root root 12 June 4 18:09 soft.txt

5, the error operation, through the soft connection to delete the actual existence of data.

[[email protected] home]#ln-s/usr/soft/home/soft_link[[email protected] home]#ls1234. Cap Freeswitch.bin logs monitor packages.tar.gz Wwwadtec Soft_link lost+found Monitor_log recordings[[email protected]-linux Home]#rm-rf/home/soft_link/[[email protected] home]#ls1234. Cap Freeswitch.bin logs monitor packages.tar.gz Wwwadtec Soft_link lost+found Monitor_log recordings[[email protected]-linux Home]#CD soft_link/[[email protected] soft_link]#ls[[email protected] soft_link]#cd/usr/soft/[[email protected] soft]#ls



Note: You want to delete the linked file with the following command Rm/home/soft_link just a "/" Delete is linked file, that is, in the end of the file do not add/

Linux Delete soft Connect

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.