list.rst.inc 3.9 KB

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