FUNDAMENTALS OF COMPUTER

OPERATING SYSTEMS FOR COMPUTERS

COMMAND LINE INTERFACE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The copy command is to move in Windows as cp is to ____ in Linux.
A
cv
B
mv
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -To copy directory dir1 with all the files and subdirectories to a different directory, issue “cp-r dir1 <path to new dir>”. “mv” command is used to move or rename files and directories. It also requires at least two arguments. To rename file file1 to file2, issue “mv file1 file2” command.

Detailed explanation-2: -Nothing gets copied or moved if the source and destination are on the same partition. Various inode components get manipulated, that’s all. If the source and destination are different then you will see a physical copy and delete.

Detailed explanation-3: -The mv command moves files and directories from one directory to another or renames a file or directory. If you move a file or directory to a new directory, it retains the base file name. When you move a file, all links to other files remain intact, except when you move it to a different file system.

There is 1 question to complete.