Monday, October 22, 2012

Mac OSX Terminal : How to rename a file or folder


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

1 comment:

  1. How would you rename multiple files each with unique names? Such as music files from Track01, Track02, ... Tracknn to Penney Lane, Hey Jude, ... Yesterday.

    ReplyDelete