list.rst.inc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. borg:command:: borg list
  3. .. _borg_list:
  4. borg list
  5. ---------
  6. ::
  7. borg [common options] list <options> REPOSITORY_OR_ARCHIVE PATH
  8. positional arguments
  9. REPOSITORY_OR_ARCHIVE
  10. repository/archive to list contents of
  11. PATH
  12. paths to list; patterns are supported
  13. optional arguments
  14. ``--short``
  15. | only print file/directory names, nothing else
  16. ``--format``, ``--list-format``
  17. | specify format for file listing
  18. | (default: "{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NL}")
  19. ``--json``
  20. | Only valid for listing repository contents. Format output as JSON. The form of --format is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available.
  21. ``--json-lines``
  22. | Only valid for listing archive contents. Format output as JSON Lines. The form of --format is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available.
  23. `Common options`_
  24. |
  25. filters
  26. ``-P``, ``--prefix``
  27. | only consider archive names starting with this prefix
  28. ``--sort-by``
  29. | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  30. ``--first N``
  31. | consider first N archives after other filters were applied
  32. ``--last N``
  33. | consider last N archives after other filters were applied
  34. Exclusion options
  35. ``-e PATTERN``, ``--exclude PATTERN``
  36. | exclude paths matching PATTERN
  37. ``--exclude-from EXCLUDEFILE``
  38. | read exclude patterns from EXCLUDEFILE, one per line
  39. ``--exclude-caches``
  40. | exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
  41. ``--exclude-if-present NAME``
  42. | exclude directories that are tagged by containing a filesystem object with the given NAME
  43. ``--keep-exclude-tags``, ``--keep-tag-files``
  44. | if tag objects are specified with --exclude-if-present, don't omit the tag objects themselves from the backup archive
  45. ``--pattern PATTERN``
  46. | include/exclude paths matching PATTERN
  47. ``--patterns-from PATTERNFILE``
  48. | read include/exclude patterns from PATTERNFILE, one per line
  49. Description
  50. ~~~~~~~~~~~
  51. This command lists the contents of a repository or an archive.
  52. See the "borg help patterns" command for more help on exclude patterns.
  53. .. man NOTES
  54. The following keys are available for --format:
  55. - NEWLINE: OS dependent line separator
  56. - NL: alias of NEWLINE
  57. - NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
  58. - SPACE
  59. - TAB
  60. - CR
  61. - LF
  62. Keys for listing repository archives:
  63. - archive, name: archive name interpreted as text (might be missing non-text characters, see barchive)
  64. - barchive: verbatim archive name, can contain any character except NUL
  65. - time: time of creation of the archive
  66. - id: internal ID of the archive
  67. Keys for listing archive files:
  68. - type
  69. - mode
  70. - uid
  71. - gid
  72. - user
  73. - group
  74. - path: path interpreted as text (might be missing non-text characters, see bpath)
  75. - bpath: verbatim POSIX path, can contain any character except NUL
  76. - source: link target for links (identical to linktarget)
  77. - linktarget
  78. - flags
  79. - size
  80. - csize: compressed size
  81. - dsize: deduplicated size
  82. - dcsize: deduplicated compressed size
  83. - num_chunks: number of chunks in this file
  84. - unique_chunks: number of unique chunks in this file
  85. - mtime
  86. - ctime
  87. - atime
  88. - isomtime
  89. - isoctime
  90. - isoatime
  91. - md5
  92. - sha1
  93. - sha224
  94. - sha256
  95. - sha384
  96. - sha512
  97. - archiveid
  98. - archivename
  99. - extra: prepends {source} with " -> " for soft links and " link to " for hard links
  100. - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)