Linux copy, move, delete

  • cp: copy a file or folder (copy)

    - cp original_filename copy_filename (generated copy files in the current directory, and renamed copy_filename) 

    - cp original_filename address (address generation copy files in a directory)

    - cp original_filename address / copy_filename (address generation copy files in a directory, and renamed copy_filename)

    - cp -r original_foldername copy_foldername (copy generated in the current directory folder and renamed copy_foldername) - (-r parameter is recursive, recursive meaning)

    - cp * .txt folder (copy all .txt files in the current directory to the directory floder) - ( * is the wildcard )

    - cp fan * floder (file all begin with the fan in the copy of the current directory to the directory floder)

  • mv: move files (move)

    - Music Videos filename address (the address to move filename directory file) - (the copy and cp - Different paste, which is cut - paste)

    - mv foldername address (the foldername folder to address directory) - ( do not need -r parameter )

    - mv * .txt address (will move all .txt files in the current directory to the address directory)

    - mv filename filerename (filename, file renamed filerename) - (Linux is no specific renamed command)

  • rm: delete a file or folder (remove)

    - rm filename (filename delete files)

    - rm file1name file2name file3name (delete multiple files)

    - rm -r foldername (delete foldername folder)

Guess you like

Origin www.cnblogs.com/VCplus/p/11427403.html