2015-03-25 16:09:49 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex examinekey - prints information from a key
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex examinekey `[key ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
This plumbing-level command is given a key, and prints information
|
|
|
|
that can be determined purely by looking at the key.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--format=value`
|
|
|
|
|
|
|
|
Use custom output formatting.
|
|
|
|
|
|
|
|
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}';
|
2023-04-11 18:06:46 +00:00
|
|
|
to escape unusual characters (including control characters)
|
|
|
|
in a variable, use '${escaped_var}'
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2020-11-12 17:02:31 +00:00
|
|
|
To generate a path from the top of the repository to the git-annex
|
|
|
|
object for a key, use ${objectpath}. To generate the value of a
|
|
|
|
git-annex pointer file for a key, use ${objectpointer}.
|
|
|
|
|
|
|
|
These variables are also available for use in formats: ${key}, ${backend},
|
|
|
|
${bytesize}, ${humansize}, ${keyname}, ${hashdirlower}, ${hashdirmixed},
|
2020-11-16 13:56:32 +00:00
|
|
|
${mtime} (for the mtime field of a WORM key), ${file} (when a filename is
|
|
|
|
provided to examinekey).
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Also, '\\n' is a newline, '\\000' is a NULL, etc.
|
2023-04-11 18:57:09 +00:00
|
|
|
|
|
|
|
The default output format is the same as `--format='${escapedkey}\\n'`
|
2023-04-26 04:12:38 +00:00
|
|
|
except when outputting to a terminal, control characters will be escaped.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
2023-04-25 21:37:34 +00:00
|
|
|
git-annex. Each line of output is a JSON object.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2023-04-25 21:37:34 +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
|
|
|
|
2020-11-12 18:08:13 +00:00
|
|
|
* `--migrate-to-backend=backend`
|
|
|
|
|
|
|
|
Attempt to migrate the input key to the new backend specified. If
|
|
|
|
successful, outputs information about the migrated key. Otherwise,
|
|
|
|
outputs information about the input key.
|
|
|
|
|
|
|
|
This only does fast migrations; it will not re-hash the content of a key
|
|
|
|
or similar expensive operation.
|
|
|
|
|
|
|
|
One way to use it is to add an extension to a key.
|
|
|
|
|
|
|
|
git-annex examinekey SHA256--xxx --migrate-to-backend=SHA256E --filename=foo.tar.gz
|
|
|
|
|
|
|
|
Or to remove the extension from a key:
|
|
|
|
|
2024-03-01 19:44:46 +00:00
|
|
|
git-annex examinekey SHA256E--xxx.tar.gz --migrate-to-backend=SHA256
|
2020-11-12 18:08:13 +00:00
|
|
|
|
|
|
|
* `--filename=name`
|
|
|
|
|
|
|
|
The name of a file associated with the key, eg a work tree file.
|
|
|
|
It does not need to exist. This is needed when using `--migrate-to-backend`
|
|
|
|
to add an extension to the key.
|
|
|
|
|
2015-05-06 17:44:53 +00:00
|
|
|
* `--batch`
|
|
|
|
|
|
|
|
Enable batch mode, in which a line containing a key is read from stdin,
|
|
|
|
the information about it is output to stdout, and repeat.
|
|
|
|
|
2020-11-12 18:08:13 +00:00
|
|
|
In order to also provide the name of a file associated with the key, the
|
|
|
|
line can be in the format "$key $file"
|
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|