cp
QNX SDP8.0Utilities ReferenceUtilities
Copy files (POSIX, toybox)
Syntax:
cp [-adfHiLlnPpRrsTv] [--preserve=motcxa] [-t target] source... [dest]
Runs on:
QNX OS
Options:
- -a
- Same as -dpr.
- -D --parents
- Create leading directories under the destination file.
- -d
- Don't dereference symbolic links.
- -F
- Delete any existing destination file first.
- -f
- Delete destination files you can't write to.
- -H
- Follow the symbolic links listed on the command line.
- -i
- Run interactively; always prompt before overwriting an existing destination file.
- -L
- Follow all symbolic links.
- -l
- ("el") Hard link files instead of copying.
- -n
- No clobber; don't overwrite the destination file.
- -u
- Update; keep the most recent modified time.
- -P
- Do not follow symbolic links.
- -p
- Preserve timestamps, the ownership of each file, and the file mode.
- --preserve= motcxa
- Preserve the specified attributes.
- -R
- Recursively copy the contents of a directory into subdirectories. The destination must be a directory.
- -r
- Same as -R.
- -s
- Create symbolic links instead of copying.
- -t target
- Copy files to the target directory (no destination).
- -T
- The destination is always treated as a file, with a maximum of two arguments.
- -v
- Be verbose.
- dest
- The pathname of the directory to which cp copies.
- source
- The pathname of the directory that cp copies from.
Description:
The cp utility copies the contents of the source file to the destination file. If there is more than one source file, the destination must be a directory.
Arguments to --preserve are the first letter(s) of the following:
- mode — permissions (ignores calls to umask for read, write, execute; copy setuid and sticky bit permissions)
- ownership — user and group access
- timestamps — file creation, modification, and access times
- context — security context
- xattr — extended attributes
- all — all the above
Contributing author:
Rob Landley and the toybox project (see https://landley.net/toybox/).
Page updated: