1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 00:54:57 +00:00
serenity/Base/usr/share/man/man1/cp.md
kleines Filmröllchen afaea38be2 Base: Expand "See Also" sections of many manpages
This commit focuses on the CLI utilities.
2023-07-06 10:03:48 +01:00

1.1 KiB

Name

cp - copy files

Synopsis

$ cp [options...] <source...> <destination>

Description

cp copies files specified in source to destination.

If there are several sources, the directory destination is created and all files specified in sources are copied into that directory. Otherwise, the source file is copied as destination file. If the file exists, it is overridden. If destination directory exists and there is only one source, the source file is copied into the destination directory.

If a directory is specified in source, the -R (recursive) flag is required. Otherwise, an error occurs.

Options

  • -l, --link: Create hard links instead of copying
  • -R, -r, --recursive: Copy directories recursively
  • -v, --verbose: Display what files are copied

Examples

# Copy test file and name it test-backup
$ cp test test-backup

# Copy tests directory and name it tests-backup
$ cp -R tests tests-backup

# Copy test file into existing root
$ cp test root

See also