- Basic Usage
- Linux's cp command copies files and directories between locations
- Basic format: cp [options] source_file target_file
- Default execution occurs in current directory
- Files with same name cannot exist in same directory
- Command Options
- -v shows command progress
- -p preserves file attributes like creation date
- -f forces copy by deleting existing file
- -i prompts for confirmation
- -R copies directories recursively
- -u updates only if source is newer
- Copying Multiple Files
- Multiple files can be copied simultaneously
- Wildcards can be used for searching
- -R option copies entire folders recursively
- Alternative Method
- rsync command synchronizes data between locations
- Similar to cp but with different functionality