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