list.rst.inc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. |
  23. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | .. class:: borg-common-opt-ref |
  25. | |
  26. | :ref:`common_options` |
  27. +-------------------------------------------------------+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | **Include/Exclude 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.
  53. :ref:`common_options`
  54. |
  55. Include/Exclude 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
  83. - SPACE: space character
  84. - TAB: tab character
  85. - CR: carriage return character
  86. - LF: line feed character
  87. Keys available only when listing files in an archive:
  88. - type: file type (file, dir, symlink, ...)
  89. - mode: file mode (as in stat)
  90. - uid: user id of file owner
  91. - gid: group id of file owner
  92. - user: user name of file owner
  93. - group: group name of file owner
  94. - path: file path
  95. - target: link target for symlinks
  96. - hlid: hard link identity (same if hardlinking same fs object)
  97. - flags: file flags
  98. - size: file size
  99. - dsize: deduplicated size
  100. - num_chunks: number of chunks in this file
  101. - unique_chunks: number of unique chunks in this file
  102. - mtime: file modification time
  103. - ctime: file change time
  104. - atime: file access time
  105. - isomtime: file modification time (ISO 8601 format)
  106. - isoctime: file change time (ISO 8601 format)
  107. - isoatime: file access time (ISO 8601 format)
  108. - blake2b
  109. - blake2s
  110. - md5
  111. - sha1
  112. - sha224
  113. - sha256
  114. - sha384
  115. - sha3_224
  116. - sha3_256
  117. - sha3_384
  118. - sha3_512
  119. - sha512
  120. - xxh64: XXH64 checksum of this file (note: this is NOT a cryptographic hash!)
  121. - archiveid: internal ID of the archive
  122. - archivename: name of the archive
  123. - extra: prepends {target} with " -> " for soft links and " link to " for hard links
  124. - health: either "healthy" (file ok) or "broken" (if file has all-zero replacement chunks)