Goffi's cp, a fancy file copier
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. .\" Hey, EMACS: -*- nroff -*-
  2. .\" First parameter, NAME, should be all caps
  3. .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
  4. .\" other parameters are allowed: see man(7), man(1)
  5. .TH GCP 1 "October 14, 2018"
  6. .\" Please adjust this date whenever revising the manpage.
  7. .\"
  8. .\" Some roff macros, for reference:
  9. .\" .nh disable hyphenation
  10. .\" .hy enable hyphenation
  11. .\" .ad l left justify
  12. .\" .ad b justify to both left and right margins
  13. .\" .nf disable filling
  14. .\" .fi enable filling
  15. .\" .br insert line break
  16. .\" .sp <n> insert n+1 empty lines
  17. .\" for manpage-specific macros, see man(7)
  18. .\" TeX users may be more comfortable with the \fB<whatever>\fP and
  19. .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
  20. .\" respectively.
  21. .SH NAME
  22. gcp \- Advanced command-line file copier
  23. .SH SYNOPSIS
  24. .B gcp
  25. .RI [ OPTIONS ]
  26. .I FILE DEST
  27. .br
  28. .B gcp
  29. .RI [ OPTIONS ]
  30. .I FILE1
  31. .RI [ FILE2 ... ]
  32. .I DEST-DIR
  33. .SH DESCRIPTION
  34. \fBgcp\fP is a file copier, loosely inspired by cp, but with high level
  35. functionalities like:
  36. .IP \(bu 2
  37. transfer progression indication
  38. .IP \(bu
  39. continuous copying when there is an issue: it skips the problematic file and
  40. goes on
  41. .IP \(bu
  42. copy status logging: which files were effectively copied
  43. .IP \(bu
  44. name mangling to handle target filesystem limitations (e.g. removing
  45. incompatible chars like "?" or "*" on FAT filesystems)
  46. .IP \(bu
  47. forced copy serialization: new files to copy are added to a global queue to
  48. avoid hard drive head seeks
  49. .IP \(bu
  50. transfer list management: gcp can save a list of files to copy and reuse it
  51. later
  52. .IP \(bu
  53. approximate option compatibility with cp (approximate because the behaviour is
  54. not exactly the same, see below)
  55. .SH OPTIONS
  56. These programs follow the usual GNU command line syntax, with long
  57. options starting with two dashes (`-').
  58. .PP
  59. A summary of options is included below.
  60. .SS General options
  61. .TP
  62. .B \-h, \-\-help
  63. Show summary of options.
  64. .TP
  65. .B \-V, \-\-version
  66. Show program version and copyright information and exit.
  67. .SS cp-like options
  68. .TP
  69. .B \-f, \-\-force
  70. Overwrite existing files.
  71. .TP
  72. .B \-L, \-\-dereference
  73. Always follow symbolic links in sources.
  74. .TP
  75. .B \-P, \-\-no\-dereference
  76. Never follow symbolic links in sources.
  77. .TP
  78. .B \-p
  79. Same as \fB\-\-preserve=mode,ownership,timestamps\fP
  80. .TP
  81. .B \-\-preserve=<\fIattributes\fP>
  82. Preserve specified attributes. Attributes can be \fImode\fP, \fIownership\fP
  83. and \fItimestamps\fP.
  84. When several attributes are passed, they need to be separated by commas.
  85. Please note that timestamps preservation has some limits, see section
  86. \fILIMITATIONS\fP.
  87. .TP
  88. .B \-r, \-R, \-\-recursive
  89. Copy directories recursively.
  90. .TP
  91. .B \-v, \-\-verbose
  92. Display what is being done.
  93. .SS gcp-specific options
  94. .TP
  95. .B \-\-fix\-filenames=<\fIforce\fP|\fIauto\fP|\fIno\fP>
  96. gcp has the ability to modify the destination file name if the target file
  97. system would not accept the original file name.
  98. Offending characters will be replaced with similar-looking ones.
  99. .IP
  100. This option accept the following values:
  101. .RS
  102. .TP
  103. \fIauto\fP (default)
  104. gcp will attempt to be smart, i.e. detect incompatibilities and fix them as-needed.
  105. .TP
  106. \fIforce\fP
  107. Always fix file names that could cause problems on any known filesystem or OS.
  108. This is useful e.g. with NTFS, see \fINOTE ON NTFS\fP below.
  109. .TP
  110. \fIno\fP
  111. Renaming is disabled entirely.
  112. .RE
  113. .IP
  114. Currently, gcp is only aware of FAT incompatibilities:
  115. \'\\\', \':\', \'*\', \'?\', \'"\', \'<\', \'>\' and \'|\'.
  116. .TP
  117. .B \-\-no\-fs\-fix (DEPRECATED)
  118. Same as \fB\-\-fix\-filenames=no\fP.
  119. This option will be removed in a future release.
  120. .TP
  121. .B \-\-no\-progress
  122. Disable progress bar.
  123. .SS Sources saving
  124. .TP
  125. .B \-\-sources\-save=\fISOURCES\fP
  126. Save the list of source files in a list named \fISOURCES\fP.
  127. .TP
  128. .B \-\-sources\-replace=\fISOURCES\fP
  129. Save the list of source files in a list named \fISOURCES\fP;
  130. the file is overwritten it already exists.
  131. .TP
  132. .B \-\-sources\-load=\fISOURCES\fP
  133. Use the list of source files named \fISOURCES\fP.
  134. .TP
  135. .B \-\-sources\-del=\fISOURCES\fP
  136. Delete the list of source files named \fISOURCES\fP.
  137. .TP
  138. .B \-\-sources\-list
  139. List the names of source file lists.
  140. .TP
  141. .B \-\-sources\-full\-list
  142. List the names of source file lists, including their content.
  143. .SH EXIT STATUS
  144. The exit status can be:
  145. .IP \[bu] 2
  146. \fB0\fP if files have been copied correctly or if another instance of gcp is
  147. already running and will do the copy.
  148. .IP \[bu]
  149. \fB1\fP if at least one file has not been copied, or if something went wrong.
  150. .IP \[bu]
  151. \fB2\fP if all files have been copied but with some issues
  152. .SH LIMITATIONS
  153. Timestamps preservation with \fB\-\-preserve\fP option is limited by the
  154. \fIos\fP Python module on POSIX systems. Currently, Python only returns
  155. timestamps in float format, which is a smaller precision than what POSIX
  156. provides. Progress on this issue can be seen at
  157. http://bugs.python.org/issue11457.
  158. .PP
  159. The \fB\-\-preserve\fP option cannot currently be used without an attribute
  160. list (\fBgcp \-\-preserve foo bar\fP will behave as \fBgcp \-\-preserve=foo
  161. bar\fP). Use the \fB\-p\fP switch instead.
  162. .SH NOTE ON NTFS
  163. NTFS will not enforce the same file name limitations than FAT, but files that
  164. would not be accepted on a FAT filesystem will still cause problems on Windows.
  165. Hence, it is recommended to use \-\-fix-filenames=force when copying to NTFS
  166. (when Windows compatibility is desired, anyway).
  167. .SH SEE ALSO
  168. .BR cp (1).
  169. .br
  170. .SH AUTHOR
  171. gcp was written by Jérôme Poisson <goffi@goffi.org>.
  172. It is currently maintained by Matteo Cypriani <mcy@lm7.fr>.
  173. .PP
  174. This manual page was initially written by Thomas Preud'homme
  175. <robotux@celest.fr> for the Debian project (and may be used by others).