Created
September 11, 2023 02:52
-
-
Save TJRoger/d56d913bb40bfe78ec05eff8ac59842b to your computer and use it in GitHub Desktop.
Remove all symlinks for which the previously linked file location no longer exists.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# encoding: utf-8 | |
########################################################################### | |
# Copyright © 2023 Roger Luo. All rights reserved. | |
########################################################################### | |
# Author: Roger Luo[[email protected]] | |
# Created At: 2023-09-11 10:49:50 | |
# File: clean_symbolink.sh | |
# desc: | |
# vim: set ts=4 sw=4 sts=4 tw=100 | |
find -L . -type l -exec rm -- {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://unix.stackexchange.com/a/625628