Getting Started with Linux: to copy and move files

A copy folder: cp command
. 1> CP dir1 / dir2 a.doc shows a copy in a.doc file directory dir1 dir2 to the lower
2> CP -R & lt dir1 dir2 shows a file copy and dir1 dir1 contains to the next dir2
3> . cp -r dir1 / dir2 said it will copy the files in dir1 to dir2, not including the catalog dir1
Description: cp parameter -i: ask, if the target file already exists, you are asked whether to overwrite;

Second, the file is moved (Music Videos)
       move file is different from the file copy, file cut and paste movement equivalent to the term in our word.
Command: mv AAA BBB said it would be renamed AAA to BBB
Description: consistent with the original target directory directory, specify a new file name, the effect is just renamed. Inconsistent with the original target directory directory, do not specify a new file name, the effect is to move only. Inconsistent with the original target directory directory, specify a new file name, the effect is: mobile + renamed.

He published 185 original articles · won praise 873 · Views 1.27 million +

Guess you like

Origin blog.csdn.net/duan19920101/article/details/104009604