Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

Changing the name or location of a directory

Tech Computer Center logo

If you decide to change the name of a directory, or move it to a different location in your file structure, you can use the mv command.

For example, if you have a directory whose relative pathname is bob/ray and you want to change it to bob/dobbs, you could use this command:

    % mv bob/ray bob/dobbs

As another example, to move directory bob/dobbs so that it then lives in directory /u/gene/pickle:

    % mv bob/dobbs /u/gene/pickle

There are some restrictions on where you can move a directory. If you try to move a directory and you get a message something like "cannot move file across filesystems", please ask a system programmer for advice.


Next: How to make a file appear in multiple directories
See also: How to organize large collections of files
Previous: Getting rid of a directory
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

Last updated: UT
URL: http://www.nmt.edu/tcc/help/unix/mvdir.html
QR two-dimensional bar code