How to rename a file via SSH

On a Linux server you can rename a file using mv command.
Let say you want to rename file-one.txt to file-two.txt
Use following command for this.

mv file-one.txt file-two.txt

Another example. Suppose we want to rename ravi.txt to lophost.txt located in /var

mv /var/ravi.txt /var/lophost.txt

Our Top Rated Host

Related Posts