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

No Comments

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

Example:

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

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

NOTE:

  • 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

Image Credits: Photo by Isis França on Unsplash.

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link