list.rst.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_list:
  3. borg list
  4. ---------
  5. .. code-block:: none
  6. borg [common options] list [options] NAME [PATH...]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  12. | | ``NAME`` | specify the archive name |
  13. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | | ``PATH`` | paths to list; patterns are supported |
  15. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | **options** |
  17. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | | ``--short`` | only print file/directory names, nothing else |
  19. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | | ``--format FORMAT`` | specify format for file listing (default: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}") |
  21. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | | ``--json-lines`` | 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. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | .. class:: borg-common-opt-ref |
  25. | |
  26. | :ref:`common_options` |
  27. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | **Exclusion options** |
  29. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  31. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  33. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
  35. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
  37. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. .. raw:: html
  39. <script type='text/javascript'>
  40. $(document).ready(function () {
  41. $('.borg-options-table colgroup').remove();
  42. })
  43. </script>
  44. .. only:: latex
  45. NAME
  46. specify the archive name
  47. PATH
  48. paths to list; patterns are supported
  49. options
  50. --short only print file/directory names, nothing else
  51. --format FORMAT specify format for file listing (default: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}")
  52. --json-lines 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.
  53. :ref:`common_options`
  54. |
  55. Exclusion options
  56. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  57. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  58. --pattern PATTERN include/exclude paths matching PATTERN
  59. --patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
  60. Description
  61. ~~~~~~~~~~~
  62. This command lists the contents of an archive.
  63. For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
  64. .. man NOTES
  65. The FORMAT specifier syntax
  66. +++++++++++++++++++++++++++
  67. The ``--format`` option uses python's `format string syntax
  68. <https://docs.python.org/3.9/library/string.html#formatstrings>`_.
  69. Examples:
  70. ::
  71. $ borg list --format '{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}' ArchiveFoo
  72. -rw-rw-r-- user user 1024 Thu, 2021-12-09 10:22:17 file-foo
  73. ...
  74. # {VAR:<NUMBER} - pad to NUMBER columns left-aligned.
  75. # {VAR:>NUMBER} - pad to NUMBER columns right-aligned.
  76. $ borg list --format '{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}' ArchiveFoo
  77. -rw-rw-r-- user user 1024 Thu, 2021-12-09 10:22:17 file-foo
  78. ...
  79. The following keys are always available:
  80. - NEWLINE: OS dependent line separator
  81. - NL: alias of NEWLINE
  82. - NUL: NUL character for creating print0 / xargs -0 like output, see barchive and bpath keys below
  83. - SPACE
  84. - TAB
  85. - CR
  86. - LF
  87. Keys available only when listing files in an archive:
  88. - type
  89. - mode
  90. - uid
  91. - gid
  92. - user
  93. - group
  94. - path: path interpreted as text (might be missing non-text characters, see bpath)
  95. - bpath: verbatim POSIX path, can contain any character except NUL
  96. - source: link target for symlinks (identical to linktarget)
  97. - linktarget
  98. - hlid: hard link identity (same if hardlinking same fs object)
  99. - flags
  100. - size
  101. - dsize: deduplicated size
  102. - num_chunks: number of chunks in this file
  103. - unique_chunks: number of unique chunks in this file
  104. - mtime
  105. - ctime
  106. - atime
  107. - isomtime
  108. - isoctime
  109. - isoatime
  110. - blake2b
  111. - blake2s
  112. - md5
  113. - sha1
  114. - sha224
  115. - sha256
  116. - sha384
  117. - sha3_224
  118. - sha3_256
  119. - sha3_384
  120. - sha3_512
  121. - sha512
  122. - xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  123. - archiveid
  124. - archivename
  125. - extra: prepends {source} with " -> " for soft links and " link to " for hard links
  126. - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)