cp (C1)
command
Pronunciation: ˌsiːˈpiː
Definition
A command in Unix-like operating systems used to copy files and directories from one location to another.
Examples
To copy a file named 'report.txt' to a directory named 'backup', you would use the command 'cp report.txt backup/'.
The 'cp' command can also copy entire directories if you use the '-r' option.
How to Use cp
- cp source destination (command structure)
- Copies a file or directory from a source to a destination. — "cp mydocument.txt /home/user/documents/"
- cp -r directory1 directory2 (command structure)
- Recursively copies a directory and its contents. — "cp -r myproject/ backup/"
- cp -i file1 file2 (command structure)
- Copies files, prompting before overwriting an existing file. — "cp -i important_config.conf /etc/nginx/"
Browse the full Anaversity dictionary