mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:07:35 +00:00
Base: Add more manpages for command-line utilities
This commit is contained in:
parent
5d8585df97
commit
57340dda36
25 changed files with 749 additions and 0 deletions
36
Base/usr/share/man/man1/cp.md
Normal file
36
Base/usr/share/man/man1/cp.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
## Name
|
||||
|
||||
cp - copy files
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ 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
|
||||
|
||||
```sh
|
||||
# Copy cpp-tests file and name it cpp-tests-backup
|
||||
$ cp cpp-tests cpp-tests-backup
|
||||
|
||||
# Copy cpp-tests directory and name it cpp-tests-backup
|
||||
$ cp -R cpp-tests cpp-tests-backup
|
||||
|
||||
# Copy cpp-tests file into existing root
|
||||
$ cp cpp-tests root
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue