Skip to content

Add support to find dead symlinks#1641

Closed
cgzones wants to merge 1 commit intosharkdp:masterfrom
cgzones:dead_symlink
Closed

Add support to find dead symlinks#1641
cgzones wants to merge 1 commit intosharkdp:masterfrom
cgzones:dead_symlink

Conversation

@cgzones
Copy link
Contributor

@cgzones cgzones commented Nov 29, 2024

Find dead symbolic links by reusing the --type empty flag.

Find dead symbolic links by reusing the `--type empty` flag.
@sorairolake
Copy link
Contributor

I think this can be achieved by running fd -t symlink -L. So I don't think there is a need for another way to do this.

See also #1298.

GNU findutils describes about find -L -type l which is similar to fd -t symlink -L:1

symbolic link; if '-L' is in effect, this is true only for broken symbolic links. If you want to search for symbolic links when '-L' is in effect, use '-xtype' instead of '-type'.

So it may be useful to explain how to search broken links in README.md or fd(1).

Footnotes

  1. https://www.gnu.org/software/findutils/manual/html_node/find_html/Type.html

@cgzones cgzones closed this Mar 26, 2025
@cgzones cgzones deleted the dead_symlink branch March 26, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments