Correct option is D
The correct answer is (D) mv oldname.txt newname.txt
The
**mv**(move) command is used in Linux to rename files and directories.When used as
mv oldname.txt newname.txt, it renames the file without creating a duplicate.This command is efficient because it simply updates the file metadata without copying data.
mvis used for both moving and renaming files or directories.Syntax:
mv [source] [destination]Example:
mv notes.txt archive/movesnotes.txtinto thearchivefolder.No confirmation prompt is given by default; existing files may be overwritten unless
-i(interactive) is used.
Option A –
Create: Not a valid Linux command.Option B –
touch: Creates new empty files; cannot rename or move files.Option C –
cp: Copies the file to a new name but keeps the original file intact.