How to rename a file in Linux?

Asked 15-Apr-2022
Viewed 321 times

1 Answer


0

How to rename a file in Linux?
  • There are various ways to rename files in Linux, including the graphical user interface and a number of dedicated terminal commands. Individual files can be renamed reasonably easily, however renaming numerous files at once can be difficult.
  • To move files and directories from the terminal, use the Linux mv (move) command. The syntax is as follows:
  • mv [options] [source] [destination]
  • When you use the mv command and specify a target directory, the source file is moved to that directory. If the destination file has a different name than the source file, the mv command renames the source file to that name.


Read More: How to copy a file in Linux?