The primary use of the mv command is to move and rename files and directories. To copy an entire directory, pass the -R flag before typing the source directory, followed by the destination directory:Ĭp -R /home/username/Documents /home/username/Documents_backup 7. To copy the content of a file to a new file in the same directory, enter cp followed by the source file and the destination file: To copy files to a directory, enter the file names followed by the destination directory:Ĭp filename1.txt filename2.txt filename3.txt /home/username/Documents To copy one file from the current directory to another, enter cp followed by the file name and the destination directory. Use the cp command to copy files or directories and their content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |