rm
mv
rm -r
none of the mentioned
Answer is Right!
Answer is Wrong!
The correct answer is: B. mv
The command mv
is used to move files from one location to another. It can also be used to rename files by specifying the new name after the destination. For example, to rename a file called file1
to file2
, you would use the following command:
mv file1 file2
The command rm
is used to remove files. It can also be used to remove directories, but this is not recommended, as it can lead to data loss. The command rm -r
is used to remove directories recursively, including all files and subdirectories.
Therefore, the only command that can be used to rename files is mv
.