linux copy files terminal cp -r 1

linux copy files terminal cp -r

cp ~/[path_of_files_from] ~/[path_of_files_to]
-r # recursively, for folders
-f # force, to force replace all existing files

Here is what the above code is Doing:
1. Copy all files from the current directory to the directory /home/user/backup.
2. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory.
3. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten.
4. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created.
5. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created. If the destination directory contains files that are not present in the source directory, they will be deleted.
6. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted.
7. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted.
8. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted.
9. Copy all files from the current directory to the directory /home/user/backup, but only if the file is newer than the one in the destination directory. If the file already exists in the destination directory, it will be overwritten. If the destination directory does not exist, it will be created. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination directory contains files that are not present in the source directory, they will be deleted. If the destination

Similar Posts