Home > Article > Operation and Maintenance > How to delete soft links in linux?
#mkdir test_chk #touch test_chk/test.txt #vim test_chk/test.txt (这一步随便在这个test.txt里写点东东即可)
Let’s create a soft link to the test_chk directory
#ln-s test_chk test_chk_ln
Now that the soft link is created, let’s see how to delete it
Correct deletion method (Delete soft links, but not actual data)
rm -rf ./test_chk_ln
Wrong deletion method
rm -rf ./ test_chk_ln/ (This will delete the content under the original test_chk)
Now you can see the difference, so in the future everyone will use rm -rf to delete When using soft links, be careful! ! ! !
Related learning recommendations: linux video tutorial
The above is the detailed content of How to delete soft links in linux?. For more information, please follow other related articles on the PHP Chinese website!