[murphy@eva02 playg]$ ls -l
total 12
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir1
lrwxrwxrwx. 1 murphy murphy 4 Jul 22 14:03 dir1-sym -> dir1
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir2
-rw-r--r--. 3 murphy murphy 2690 Jul 22 13:59 fun
lrwxrwxrwx. 1 murphy murphy 3 Jul 22 14:01 fun-sym -> fun
[murphy@eva02 playg]$ rm -i fun
rm: remove regular file 'fun'? y
[murphy@eva02 playg]$ ls -l
total 8
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir1
lrwxrwxrwx. 1 murphy murphy 4 Jul 22 14:03 dir1-sym -> dir1
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir2
lrwxrwxrwx. 1 murphy murphy 3 Jul 22 14:01 fun-sym -> fun
[murphy@eva02 playg]$ rm fun-sym dir1-sym/
rm: cannot remove 'dir1-sym/': Is a directory
[murphy@eva02 playg]$ ls -l
total 8
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir1
lrwxrwxrwx. 1 murphy murphy 4 Jul 22 14:03 dir1-sym -> dir1
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir2
[murphy@eva02 playg]$ rm -f dir1-sym/
rm: cannot remove 'dir1-sym/': Is a directory
[murphy@eva02 playg]$ rm -r dir1-sym/
rm: cannot remove 'dir1-sym/': Not a directory
[murphy@eva02 playg]$ rm -rf dir1-sym/
[murphy@eva02 playg]$ ls -l
total 8
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:04 dir1
lrwxrwxrwx. 1 murphy murphy 4 Jul 22 14:03 dir1-sym -> dir1
drwxrwxr-x. 2 murphy murphy 4096 Jul 22 14:02 dir2
虽然fun
和fun-sym
很容易被删除......不一样dir1-sym
吗?我怎样才能删除它?
附言。这是书本练习的一部分。估计是错了...
省略斜线:
这将删除符号链接。