![]() ![]() You’ll need to change the name of the target file to copy in the same location. However, the same file cannot exist twice in the same directory. This Linux command creates a copy of the my_file.txt file and renames the new file to my_file2.txt.īy default, the cpcommand runs in the same directory you are working in. The basic format of the command is: cp source_file target_file ![]() Virtually all Linux distributions can use cp. The cp command is the primary method for copying files and directories in Linux. Using the cp Command to Copy Files and Directories in Linux If your version of Linux boots to a desktop graphical interface, launch a terminal window by pressing CTRL-ALT-F2 or CTRL-ALT-T. Note: These Linux commands can only be run from a terminal window.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |