Command (office) Notepad _Linux directories and files can be operated

      Reference grain School Linux: http: //www.gulixueyuan.com/course/300/task/7082/show

   1 .cp
 1.1 . Main function is to copy, you can copy a file or directory.
 1.2 Syntax: cp [options] source dest or cp [Options] ... Source Directory.
 1.3 Parameters:.
     - A: This option is usually in the copy directory use it retains links, file properties, and copy all the contents of the directory. Its role is equal dpR parameter combinations.
    - d: Reserved links when copied. Here's a link is a shortcut to Windows systems.
    - f: overwrite an existing destination file without prompting.
    -i: In contrast with the -f option, prompt before overwriting the destination file, it asks the user to confirm whether to overwrite the answer " the y- " target file will be overwritten.
    - the p-: In addition to copying the contents of the file, the time and also modify the access rights are also copied to the new file.
    - R & lt: If the source file is given a file directory, then copies all files and subdirectories under the directory.
    - L: do not copy the file, but the file is generated links. 

1.4 Example: 
    using the command " cp " the current directory "/ Test " copy all files in the directory to the new " NewTest " , enter the following command: 
    CP -R & lt Test / NewTest
 2 .mv
 2.1 elsewhere .Linux mv command to rename a file or directory, or a file or directory into .
 2.2 . syntax: 
    mv [Options] Source dest 
    mv [Options] Source ... directory 
2.3 parameters:.
     - i: if the specified file directory already exists, the first asking to overwrite the old file;
     - f: in the mv operation to does not give any indication of a cover existing target file;
 2.4 . results run command format 
    mv file name of the file name to the source file name destination file name 
    mv file name of the target file to the directory name directory      
    mv filename directory error 
2.5 . example: aaa bbb change

 







   

 

Guess you like

Origin www.cnblogs.com/historylyt/p/12016947.html