Sunday, May 20, 2012

Unix Command To Rename A Folder

How do I rename a folder under UNIX operating systems using a command line tools?

You need to use the mv command to rename a folder under UNIX operating systems. You must have write permission for all folders.

Syntax

The syntax is as follows:
mv old-folder-name new-folder-name
mv /path/to/old /path/to/new

Example

In this example, a folder called drivers is renamed as olddrivers. Open a terminal (shell prompt) and type the following commands:
ls
mv drivers oldrivers
ls

No comments:

Post a Comment