How to delete soft links in linux?

藏色散人
Release: 2020-09-18 09:22:22
Original
30720 people have browsed it

How to delete soft links in linux?

How to delete soft links in Linux:

First we create a file

#mkdir test_chk
#touch test_chk/test.txt   
#vim test_chk/test.txt (这一步随便在这个test.txt里写点东东即可)
Copy after login

Let’s create a soft link to the test_chk directory

#ln-s test_chk     test_chk_ln
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template