Skip to content

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 sort contents of a file

The sort command is used to sort the contents of a file. You can sort the data in a text Read more

How to use sed command in Linux

sed, short for "stream editor", allows you to filter and transform text. A stream editor is used to perform basic Read more

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

Leave a Reply

Your email address will not be published.