GCP(1)

NAME
gcp - Advanced command-line file copier

SYNOPSIS
gcp [OPTIONS] FILE DEST
gcp [OPTIONS] FILE1 [FILE2...] DEST-DIR

DESCRIPTION
gcp is a file copier, loosely inspired by cp, but with high level functionalities like:

•   transfer progression indication

•   continuous copying when there is an issue: it skips the problematic file and goes on

•   copy status logging: which files were effectively copied

•   name mangling to handle target filesystem limitations (e.g. removing incompatible chars like "?" or "*" on FAT filesystems)

•   forced copy serialization: new files to copy are added to a global queue to avoid hard drive head seeks

•   transfer list management: gcp can save a list of files to copy and reuse it later

•   approximate option compatibility with cp (approximate because the behaviour is not exactly the same, see below)

OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-').

A summary of options is included below.

  General options

-h, --help
    Show summary of options.

-V, --version
    Show program version and copyright information and exit.

  cp-like options

-f, --force
    Overwrite existing files.

-L, --dereference
    Always follow symbolic links in sources.

-P, --no-dereference
    Never follow symbolic links in sources.

-p  Same as --preserve=mode,ownership,timestamps

--preserve=<attributes>
    Preserve specified attributes. Attributes can be mode, ownership and timestamps. When several attributes are passed, they need to be separated by commas. Please note that timestamps preservation has some limits, see section LIMITATIONS.

-r, -R, --recursive
    Copy directories recursively.

-v, --verbose
    Display what is being done.

  gcp-specific options

--fix-filenames=<force|auto|no>
    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:

    auto (default)
        gcp will attempt to be smart, i.e. detect incompatibilities and fix them as-needed.

    force
        Always fix file names that could cause problems on any known filesystem or OS. This is useful e.g. with NTFS, see NOTE ON NTFS below.

    no  Renaming is disabled entirely.

    Currently, gcp is only aware of FAT incompatibilities: '\', ':', '*', '?', '"', '<', '>' and '|'.

--no-fs-fix (DEPRECATED)
    Same as --fix-filenames=no. This option will be removed in a future release.

--no-progress
    Disable progress bar.

  Sources saving

--sources-save=SOURCES
    Save the list of source files in a list named SOURCES.

--sources-replace=SOURCES
    Save the list of source files in a list named SOURCES; the file is overwritten it already exists.

--sources-load=SOURCES
    Use the list of source files named SOURCES.

--sources-del=SOURCES
    Delete the list of source files named SOURCES.

--sources-list
    List the names of source file lists.

--sources-full-list
    List the names of source file lists, including their content.

EXIT STATUS
The exit status can be:

•   0 if files have been copied correctly or if another instance of gcp is already running and will do the copy.

•   1 if at least one file has not been copied, or if something went wrong.

•   2 if all files have been copied but with some issues

LIMITATIONS
Timestamps preservation with --preserve option is limited by the os 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 http://bugs.python.org/issue11457.

The --preserve option cannot currently be used without an attribute list (gcp --preserve foo bar will behave as gcp --preserve=foo bar). Use the -p switch instead.

NOTE ON NTFS
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).

SEE ALSO
cp(1).

AUTHOR
gcp was written by Jérôme Poisson <goffi@goffi.org>. It is currently maintained by Matteo Cypriani <mcy@lm7.fr>.

This manual page was initially written by Thomas Preud'homme <robotux@celest.fr> for the Debian project (and may be used by others).