terminal rename folder code example

Example 1: ubuntu rename folder

sudo mv oldName newName

Example 2: rename folder bash

mv /home/user/oldname /home/user/newname

Example 3: rename folder command line linux

mv old-name new-name

Example 4: how to rename a file in terminal

mv "old location" "new location"

mv /home/user/my_static /home/user/static

mv "file1.ext" "file2.ext"

Example 5: command line rename folder mac

mv old-folder-name new-folder-name

Example 6: how to rename the directory in terminal

mv [oldDirPath] [newDirPath]