Ubuntu – How to copy and paste a file

command linegnome-terminal

I want copy and paste a file. The name of the file is mkoctfile.m.
The path of this file is:

/usr/share/octave/3.2.4/m/miscellaneous/mkoctfile.m

I want to paste it to the following path

/usr/bin/mkoctfile-3.2.4

I have made the directory by using following commands:

sudo su
mkdir -p /usr/bin/mkoctfile-3.2.4

but I don't know how to copy and paste mkoctfile.m in this path.

Please tell me what command I have to use.

Best Answer

Use the cp command to copy a file, the syntax goes cp sourcefile destinationfile. Use the mv command to move the file, basically cut and paste it somewhere else.

The exact syntax you would use for your example is:

sudo cp /usr/bin/octave/3.2.4/m/miscellaneous/mkoctfile.m /usr/bin/mkoctfile-3.2.4

For more information on the cp or mv commands you can run:

man cp

or

man mv

To view the manual pages

Related Question