Home  >  Article  >  Operation and Maintenance  >  How to copy files in linux

How to copy files in linux

尚
Original
2019-12-07 11:16:3311864browse

How to copy files in linux

Copying files in Linux generally requires such a process. If there is no file, create the file first. If there is a file, you can use the CP command to copy the file to the current directory or to other directories. , if there is no directory, you need to create a directory.

For better display, I operate by adding commands through the interface. First, create a dog directory in the tmp directory for display. cd /tmp enters the tmp directory, mkdir dog creates the dog folder.

How to copy files in linux

Now there is no file in the dog folder. Create a file a. Now the directory we are in is tmp. We need to enter the dog directory and create the file.

How to copy files in linux

The file has been created. Next, copy a.txt to b.txt and use the cp command.

cp a.txt b.txt

How to copy files in linux

Recommended: linux video tutorial

The above is the detailed content of How to copy files in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn