Thursday, April 18, 2024
58
rated 0 times [  58] [ 0]  / answers: 1 / hits: 329190  / 3 Years ago, thu, september 16, 2021, 8:07:11

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.


More From » command-line

 Answers
3

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


[#27667] Saturday, September 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
girdleas

Total Points: 1
Total Questions: 112
Total Answers: 114

Location: Lesotho
Member since Wed, Jun 2, 2021
3 Years ago
girdleas questions
;