Tag Archives: copy

Copy file using command line in Ubuntu

Although Ubuntu provides a GUI but sometimes we need to use command line to perform some tasks.

To copy file using command line, you have to use cp command, with this command you can copy files and directories.

Following syntax is used to copy files via terminal:

You can check the cp command detail via typing the following command in the Terminal:

OR

Example 1: Copy file.txt to /tmp directory

Open the Terminal and type the following command:

Example 2: Copying multiple files (file.txt, file2.txt, file3.txt) to tmp directory

In command line type the following command: