blob: 624d24a06c5157e6305ad1d54adac15117e6a3b8 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
= Find broken symlinks with "find"
:categories: shell
:annex: https://git-annex.branchable.com/
:annex-wanted: https://git-annex.branchable.com/git-annex-wanted/
The `find` command knows how to show broken symlinks:
[source,sh]
----
find . -xtype l
----
This was useful to me when combined with {annex}[Git Annex]. Its
{annex-wanted}[`wanted`] option allows you to have a "sparse" checkout of the
content, and save space by not having to copy every annexed file locally:
[source,sh]
----
git annex wanted . 'exclude=Music/* and exclude=Videos/*'
----
You can `find` any broken symlinks outside those directories by querying with
Git Annex itself, but `find . -xtype l` works on other places too, where broken
symlinks might be a problem.
|