Changing filename or folder name in UNIX with Terminal.
Renaming a file/folder syntax:
-----------------
mv [from] [to]
Example for filename:
----------------------
Example for folder name:
Renaming a file/folder syntax:
-----------------
mv [from] [to]
Example for filename:
----------------------
- mv text1 text2
- mv "text with space.txt" text_with_no_space.txt
Example for folder name:
-------------------------
- mv folder1 folder2
For restricted folders, just put sudo before the command e.g. sudo mv /srv/www/index.php /srv/www/index.phtml
In case you need help with command mv, on your command line or terminal, just type either mv --help, mv -help, mv -h, or man mv depending on the distro you are using.
NOTICE:
NOTICE:
-------------
For newbie, please refrain using wild characters on your commands because you might mess up everything. To added, do this on regular user and not as a root.