
–v verbose: This option will help in showing the progress of the running command that is copying the files.Copy Command Optionsīelow are some additional copy command options that you can use with the cp command to perform various operations. If you want to copy a file that already exists in the target location, you need to change the name of the file to differentiate the new file. however, two files with the same name cannot exist in the same directory. The above Linux command will help in creating a copy of the my_file_name and then renaming the new file to the my_file_name.īy default, the copy command in Linux will get executed in the same directory you are in. Below is the basic format of the cp command that you can use.Ĭp source_file target_file Well, every Linux distribution uses the cp command. It works showhome similar to the mv command that uses to move the file or directory from one location to another. You can use the cp command in Linux to copy files and directories from one location to another. Apart from this, you will get to know how to create system-wide backups for copying specific files. In this article, we will be learning various cp command in Linux for copying files along with various options. One of the commonly performed tasks is to copy files in Linux by running specific commands along with various options for additional functionality. Linux offers flexible and simple commands for performing various operations on the files and folders. How to Copy Multiple Files from One Directory to Another in Linux

How to copy file in Linux to a different directory List of content you will read in this article:
