Copy (cp)
Used to duplicate files and directories.
Linux · Lesson
Linux · File Operations
components/linux/linuxLessons.js.Linux provides multiple tools to copy, move and synchronize files. The most commonly used commands are cp, mv and rsync.
Used to duplicate files and directories.
Used to move or rename files and directories.
Efficient tool for backup and synchronization.
Use cp to duplicate files into another directory safely.
Use -r option to copy directories and their contents.
Copy multiple files or directories in a single command.
mv relocates files or directories to another path.
mv is also used to rename files and folders.
rsync efficiently synchronizes files between locations.
Use rsync to sync directory contents efficiently.