https://askubuntu.com/questions/522051/how-to-list-all-symbolic-links-in-a-directory
Parsing ls is a Bad Idea®, prefer a simple find in that case:
find . -type l -ls
To only process the current directory:
find . -maxdepth 1 -type l -ls
找出失效的 symlinks
https://unix.stackexchange.com/questions/34248/how-can-i-find-broken-symlinks
find . -xtype l
# 先把 -exec 後面的東西先清掉, 用 -print 來先確認輸出
# rm 可以多用 -i 的參數來加以確認
find . -name "*.php" -exec rm -i {} \;
#
# 系統直接刪除
find . -delete -name "*.php"
find . -name "*.php" | xargs /bin/rm -rf
回覆刪除https://superuser.com/questions/151426/linux-find-search-root-partition-only
find / -xdev -user abcde
-xdev Don’t descend directories on other filesystems.