How to rename files and folders using the command line in Linux

Written by Ian Carnaghan · 15 sec read >

We accomplish this by using the “mv” (move command)


File Example: {codecitation class=”brush: bash;”}mv old_file new_file{/codecitation}

Directory Example: {codecitation class=”brush: bash;”}mv old_directory new_directory{/codecitation}


  • mv can move several files into a destination folder, or a single file.
  • mv renaming will contain the original attributes of the file or directory and also the creation date of the original file or folder

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. In my spare time I teach undergraduate classes in web development. Profile

Leave a Reply

Notify of