![]() To get a confirmation prompt before overwriting the files, use the -i option. If the destination file exists, it will be overwritten. , you would run the following command: cp file.txt file_backup.txt For example, to copy a file named file.txt to a file named file_backup.txt in the current directory The most simple use case is to copy a file in the current working directory. On Linux and Unix operating systems, the cpĬommand is used for copying files and directories. To be able to copy files and directories, you must have at least read permissions on the source file and write permission on the destination directory. ![]() It is common practice to use the cp command to copy files and rsync to copy directories. There are several commands for copying files in Linux, with cp and rsync being the most widely used tools. Copying files and directories is one of the most common tasks you’ll perform when working on the command line. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |