Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of deleting soft connection in linux

Shulou Source: shulou.com Published: 2022-06-02 03:12:51 10月03日 Update

This article mainly introduces the method of deleting soft connections in linux, which is very detailed and has certain reference value. Friends who are interested must finish reading it!

First, let's create a file # mkdir test_chk#touch test_chk/test.txt # vim test_chk/test.txt (just write something in this 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 has been created, let's see how to delete it

Correct deletion method (delete soft links, but do not delete actual data)

Rm-rf. / test_chk_ln

Wrong way to delete

Rm-rf. / test_chk_ln/ (this will delete the content under the original test_chk)

Now you see the difference, so when you delete soft links with rm-rf, pay attention!

The above is all the contents of linux's method of deleting soft connections. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Links content methods methods values interests practical guys partners data documents more directories knowledge articles industry information information channels errors channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information Docker macOS Xiaomi