Which utility is used to rename files ordirectories in Linux?
Note
The utility used to rename files or directories in Linux is "mv" (short for "move").
For example, to rename a file: file.txt to newfile.txt
Changes both the file's owner and group Explanation of the options provided:
- rm: This command is used to remove (delete) files or directories, not to rename them.
- mv: This command is used to move (and therefore rename) files or directories in Linux.
- cp: This command is used to copy files or directories, not to rename them.
- rename: While there is a rename command in some distributions, it is not typically used for simple renaming of files or directories as mv is more commonly used for this purpose.