From 2db36d414d41656f567055b2692f8f86a9d5442e Mon Sep 17 00:00:00 2001 From: webanck Date: Thu, 2 Aug 2018 09:44:12 +0000 Subject: [PATCH] --- .../Find_unlocked__47__locked_files.mdwn | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/forum/Find_unlocked__47__locked_files.mdwn diff --git a/doc/forum/Find_unlocked__47__locked_files.mdwn b/doc/forum/Find_unlocked__47__locked_files.mdwn new file mode 100644 index 0000000000..9f54685694 --- /dev/null +++ b/doc/forum/Find_unlocked__47__locked_files.mdwn @@ -0,0 +1,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-find and gt-annex-matching-options pages and on Google 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 ?