File: Find_unlocked__47__locked_files.mdwn

package info (click to toggle)
git-annex 10.20230126-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,344 kB
  • sloc: haskell: 74,654; javascript: 9,103; sh: 1,304; makefile: 203; perl: 136; ansic: 44
file content (23 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Hello, I would like to know if there is any way to specifically list the locked or unlocked annexed files in a git annex.
I looked at the [[git-annex-lock]], [[git-annex-find]], and [[git-annex-matching-options]] pages and even the discussion about the [[tips/unlocked_files]] but I didn't find anything.

I know it wouldn't make any sens for the older versions, but in the v6 mode, I think it might be useful to add such a shortcut search.
I mean, we can already look for local content with:
```git annex find --in=here```
so why not create something like
```git annex find --locked/unlocked=yes/no```
?

Sure it is already more or less doable by looking at symlinks:
[[!format sh """
#list all broken symlinks (locked absent files ?)
find . -xtype l 
#list all symlinks (locked present files ?)
find -L . -xtype l
#list all files that aren't symlinks (unlocked files ?)
find . -type -f
"""]]
But it is also possible for any symlink or file not to be part of the annex.
So, in order to find the locked/unlocked files, it would require to intersect the previous sets of files with the set of annexed ones.

Am I missing any easy tip or command argument to do this ?