GCP(1)

πŸ’– GCP(1) β€” the General Commands Manual glow-up πŸ’–

okay bestie, gather round, because we're talking about gcp, section 1 of the General Commands Manual, and she is that girl. 🫢


✨ NAME ✨

gcp β€” Advanced command-line file copier πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So gcp is a file copier, lowkey inspired by cp, but with high level functionalities, and honestly? it's giving main character energy:

  • transfer progression indication πŸ‘€
  • continuous copying when there's an issue β€” she just skips the problematic file and keeps going, no drama
  • copy status logging, aka receipts on which files were actually copied
  • name mangling to handle target filesystem limitations (like removing incompatible chars such as "?" or "*" on FAT filesystems) ✨
  • forced copy serialization: new files to copy get added to a global queue so we avoid hard drive head seeks (yes she's considerate like that)
  • transfer list management: gcp can save a list of files to copy and reuse it later πŸŽ€
  • approximate option compatibility with cp β€” approximate, bestie, 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. no mercy, periodt.
  • -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. she goes deep fr fr.
  • -v, --verbose β€” Display what is being done. narrating her own life, iconic.

🧚 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.
bestie she's deprecated πŸ’€ still works, but do not get attached.
  • --no-progress β€” Disable progress bar. (why would you, but okay πŸ™ˆ)

πŸŽ€ 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. the full tea β˜•

⭐ 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. slay. πŸ’…
  • 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.

not her fault, it's a Python thing, iykyk 🫠

πŸ”₯ 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).


okay that's the whole page, bestie, and the very last line of the original says October 14, 2018 β€” that's the date, and this is from the General Commands Manual, so go forth and copy files like the icon you are. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘πŸŒˆβ­πŸ’œ

πŸ“¦ where this page comes from