g.rename.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <h2>DESCRIPTION</h2>
  2. <em>g.rename</em> allows the user to rename data base
  3. element files in the user's current mapset. The user can
  4. specify all necessary information to <em>g.rename</em> on
  5. the command line, by specifying: the type of data base
  6. element to be renamed (one or more of: <b>rast</b>,
  7. <b>vect</b>, <b>icon</b>, <b>labels</b>, <b>sites</b>,
  8. <b>region</b>, and <b>group</b>); the specific file element
  9. in the current mapset to be renamed (<em>old</em>); and the
  10. new name to be assigned to this file element (<em>new</em>)
  11. in the current mapset. The file element <em>old</em> is
  12. then renamed to <em>new</em>.
  13. <p>
  14. Users can also simply type <em>g.rename -help</em> without
  15. arguments on the command line, to receive a menu of
  16. existing data base element types and files from which to
  17. choose for possible renaming:
  18. <div class="code">
  19. <pre>
  20. rast rast file(s) to be renamed
  21. oldvect oldvect file(s) to be renamed (GRASS 5.0)
  22. vect vect file(s) to be renamed (GRASS >5.1)
  23. icon icon file(s) to be renamed
  24. labels labels file(s) to be renamed
  25. sites sites file(s) to be renamed
  26. region region file(s) to be renamed
  27. group group file(s) to be renamed
  28. 3dview 3dview file(s) to be renamed
  29. </pre></div>
  30. <h2>NOTES</h2>
  31. If a data base element has support files (e.g., as is
  32. commonly the case with raster maps), these support files
  33. also are renamed.
  34. <p>
  35. If the user attempts to rename a file to itself by setting
  36. the <em>new</em> file name equal to the <em>old</em> file
  37. name (e.g., <b>g.rename rast=soils,soils</b>),
  38. <em>g.rename</em> will not execute the rename, but instead
  39. state that no rename is needed. However, <em>g.rename</em>
  40. will allow the user to overwrite other existing files in
  41. the current mapset by making the <em>new</em> file name
  42. that of an already existing file.
  43. <p>
  44. For portability reasons, <em>g.rename</em> is ignoring case of
  45. names. To change the case of a map name, first rename the map
  46. to a name which differs by more than case, then rename it to
  47. the intended name.
  48. <h2>EXAMPLE</h2>
  49. <div class="code"><pre>
  50. # rename raster map
  51. g.rename rast=oldrast,newrast
  52. # rename vector map
  53. g.rename vect=oldvect,newvect
  54. # combined renaming
  55. g.rename rast=oldrast,newrast vect=oldvect,newvect
  56. </pre></div>
  57. <h2>SEE ALSO</h2>
  58. <em><a HREF="g.copy.html">g.copy</a></em><br>
  59. <em><a HREF="g.list.html">g.list</a></em><br>
  60. <em><a HREF="g.remove.html">g.remove</a></em>
  61. <h2>AUTHOR</h2>
  62. Michael Shapiro,
  63. U.S.Army Construction Engineering
  64. Research Laboratory
  65. <p><i>Last changed: $Date$</i><p>