2015-03-24 19:23:59 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex find - lists available files
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex find `[path ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
Outputs a list of annexed files in the specified path. With no path,
|
|
|
|
finds files in the current directory and its subdirectories.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
2016-01-20 17:04:07 +00:00
|
|
|
* matching options
|
|
|
|
|
|
|
|
The [[git-annex-matching-options]](1)
|
|
|
|
can be used to specify files to list.
|
|
|
|
|
|
|
|
By default, the find command only lists annexed files whose content is
|
|
|
|
currently present. Specifying any of the matching options will override
|
|
|
|
this default behavior.
|
|
|
|
|
|
|
|
To list all annexed files, present or not, specify `--include "*"`.
|
|
|
|
|
|
|
|
To list annexed files whose content is not present, specify `--not --in=here`
|
|
|
|
|
2018-12-09 18:10:37 +00:00
|
|
|
* `--branch=ref`
|
|
|
|
|
|
|
|
List files in the specified branch or treeish.
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
* `--print0`
|
|
|
|
|
|
|
|
Output filenames terminated with nulls, for use with `xargs -0`
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
* `--format=value`
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
Use custom output formatting.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
The value is a format string, in which '${var}' is expanded to the
|
|
|
|
value of a variable. To right-justify a variable with whitespace,
|
|
|
|
use '${var;width}' ; to left-justify a variable, use '${var;-width}';
|
|
|
|
to escape unusual characters in a variable, use '${escaped_var}'
|
2015-03-24 19:23:59 +00:00
|
|
|
|
|
|
|
These variables are available for use in formats: file, key, backend,
|
|
|
|
bytesize, humansize, keyname, hashdirlower, hashdirmixed, mtime (for
|
|
|
|
the mtime field of a WORM key).
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
Also, '\\n' is a newline, '\\000' is a NULL, etc.
|
|
|
|
|
|
|
|
The default output format is the same as `--format='${file}\\n'`
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Output the list of files in JSON format.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
This is intended to be parsed by programs that use
|
|
|
|
git-annex. Each line of output is a JSON object.
|
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2018-02-19 19:33:59 +00:00
|
|
|
Messages that would normally be output to standard error are included in
|
|
|
|
the json instead.
|
2018-02-19 18:28:17 +00:00
|
|
|
|
2016-01-20 17:04:07 +00:00
|
|
|
* `--batch`
|
2015-03-24 19:23:59 +00:00
|
|
|
|
2016-01-20 17:04:07 +00:00
|
|
|
Enables batch mode, in which a file is read in a line from stdin,
|
|
|
|
its information displayed, and repeat.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
2016-01-20 17:04:07 +00:00
|
|
|
Note that if the file is not an annexed file, or is not present,
|
|
|
|
or otherwise doesn't meet the matching options, an empty line
|
|
|
|
will be output instead.
|
2015-03-24 19:23:59 +00:00
|
|
|
|
added -z
Added -z option to git-annex commands that use --batch, useful for
supporting filenames containing newlines.
It only controls input to --batch, the output will still be line delimited
unless --json or etc is used to get some other output. While git often
makes -z affect both input and output, I don't like trying them together,
and making it affect output would have been a significant complication,
and also git-annex output is generally not intended to be machine parsed,
unless using --json or a format option.
Commands that take pairs like "file key" still separate them with a space
in --batch mode. All such commands take care to support filenames with
spaces when parsing that, so there was no need to change it, and it would
have needed significant changes to the batch machinery to separate tose
with a null.
To make fromkey and registerurl support -z, I had to give them a --batch
option. The implicit batch mode they enter when not provided with input
parameters does not support -z as that would have complicated option
parsing. Seemed better to move these toward using the same --batch as
everything else, though the implicit batch mode can still be used.
This commit was sponsored by Ole-Morten Duesund on Patreon.
2018-09-20 20:09:21 +00:00
|
|
|
* `-z`
|
|
|
|
|
|
|
|
Makes the `--batch` input be delimited by nulls instead of the usual
|
|
|
|
newlines.
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-whereis]](1)
|
|
|
|
|
|
|
|
[[git-annex-list]](1)
|
|
|
|
|
2015-03-24 19:23:59 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|