You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
5.6 KiB

13 years ago
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH GCP 1 "October 14, 2018"
13 years ago
.\" Please adjust this date whenever revising the manpage.
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
13 years ago
gcp \- Advanced command-line file copier
.B gcp
.B gcp
.RI [ FILE2 ... ]
\fBgcp\fP is a file copier, loosely inspired by cp, but with high level
functionalities like:
.IP \(bu 2
transfer progression indication
.IP \(bu
continuous copying when there is an issue: it skips the problematic file and
goes on
.IP \(bu
copy status logging: which files were effectively copied
.IP \(bu
name mangling to handle target filesystem limitations (e.g. removing
incompatible chars like "?" or "*" on FAT filesystems)
.IP \(bu
forced copy serialization: new files to copy are added to a global queue to
avoid hard drive head seeks
.IP \(bu
transfer list management: gcp can save a list of files to copy and reuse it
.IP \(bu
approximate option compatibility with cp (approximate because the behaviour is
not exactly the same, see below)
13 years ago
These programs follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
A summary of options is included below.
.SS General options
13 years ago
.B \-h, \-\-help
Show summary of options.
.B \-V, \-\-version
Show program version and copyright information and exit.
.SS cp-like options
.B \-f, \-\-force
Overwrite existing files.
13 years ago
.B \-L, \-\-dereference
Always follow symbolic links in sources.
.B \-P, \-\-no\-dereference
Never follow symbolic links in sources.
13 years ago
6 years ago
.B \-p
Same as \fB\-\-preserve=mode,ownership,timestamps\fP
6 years ago
.B \-\-preserve=<\fIattributes\fP>
Preserve specified attributes. Attributes can be \fImode\fP, \fIownership\fP
and \fItimestamps\fP.
When several attributes are passed, they need to be separated by commas.
Please note that timestamps preservation has some limits, see section
13 years ago
.B \-r, \-R, \-\-recursive
Copy directories recursively.
13 years ago
.B \-v, \-\-verbose
Display what is being done.
.SS gcp-specific options
.B \-\-fix\-filenames=<\fIforce\fP|\fIauto\fP|\fIno\fP>
gcp has the ability to modify the destination file name if the target file
system would not accept the original file name.
Offending characters will be replaced with similar-looking ones.
This option accept the following values:
\fIauto\fP (default)
gcp will attempt to be smart, i.e. detect incompatibilities and fix them as-needed.
Always fix file names that could cause problems on any known filesystem or OS.
This is useful e.g. with NTFS, see \fINOTE ON NTFS\fP below.
Renaming is disabled entirely.
Currently, gcp is only aware of FAT incompatibilities:
\'\\\', \':\', \'*\', \'?\', \'"\', \'<\', \'>\' and \'|\'.
.B \-\-no\-fs\-fix (DEPRECATED)
Same as \fB\-\-fix\-filenames=no\fP.
This option will be removed in a future release.
.B \-\-no\-progress
Disable progress bar.
.SS Sources saving
13 years ago
.B \-\-sources\-save=\fISOURCES\fP
Save the list of source files in a list named \fISOURCES\fP.
13 years ago
.B \-\-sources\-replace=\fISOURCES\fP
Save the list of source files in a list named \fISOURCES\fP;
the file is overwritten it already exists.
13 years ago
.B \-\-sources\-load=\fISOURCES\fP
Use the list of source files named \fISOURCES\fP.
13 years ago
.B \-\-sources\-del=\fISOURCES\fP
Delete the list of source files named \fISOURCES\fP.
13 years ago
.B \-\-sources\-list
List the names of source file lists.
.B \-\-sources\-full\-list
List the names of source file lists, including their content.
The exit status can be:
.IP \[bu] 2
\fB0\fP if files have been copied correctly or if another instance of gcp is
already running and will do the copy.
.IP \[bu]
\fB1\fP if at least one file has not been copied, or if something went wrong.
.IP \[bu]
\fB2\fP if all files have been copied but with some issues
6 years ago
Timestamps preservation with \fB\-\-preserve\fP option is limited by the
\fIos\fP Python module on POSIX systems. Currently, Python only returns
timestamps in float format, which is a smaller precision than what POSIX
provides. Progress on this issue can be seen at
The \fB\-\-preserve\fP option cannot currently be used without an attribute
list (\fBgcp \-\-preserve foo bar\fP will behave as \fBgcp \-\-preserve=foo
bar\fP). Use the \fB\-p\fP switch instead.
NTFS will not enforce the same file name limitations than FAT, but files that
would not be accepted on a FAT filesystem will still cause problems on Windows.
Hence, it is recommended to use \-\-fix-filenames=force when copying to NTFS
(when Windows compatibility is desired, anyway).
13 years ago
.BR cp (1).
gcp was written by Jérôme Poisson <>.
It is currently maintained by Matteo Cypriani <>.
13 years ago
This manual page was initially written by Thomas Preud'homme
<> for the Debian project (and may be used by others).