Copy and Move file in Linux

To copy file

You can copy/move files in Linux using the cp and mv commands.

Copy command Syntax:

  • cp [options] <source file> <destination file>
  • cp [options] <source path of file> <destination path of file>



  • cp file1 file2
  • cp /tmp/file1 /data/file2
copy and move file in Linux

To move file

Move command Syntax:

  • mv [options]
  • mv [options]


  • mv file1 file2
  • mv /tmp/file1 /data/file2

Note: You can also use mv command to rename file

copy and move file in Linux
You may want to see
How to use crontab in Linux

Cron is the system process that will automatically perform tasks for you according to a set schedule. The schedule is Read more

How to extract archive file in Linux

To extract archive file in Linux, you can use the tar command, used for extracting content from the archive files. "tar" Read more

How to Change permission of a file in Linux

chmod command is used to change the permission of a file in Linux. In Linux, there is a set of rules for Read more

How to create and remove the directory in Linux

There is a separate command to create and remove the directory in Linux. mkdir command is used to create a directory/folder Read more

Leave a Reply

Your email address will not be published. Required fields are marked *