g.rename.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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"><pre>
  19. raster raster map(s) to be renamed
  20. 3draster 3D raster map(s) to be renamed
  21. vector vector map(s) to be renamed
  22. oldvector old (GRASS 5.0) vector map(s) to be renamed
  23. asciivector ASCII vector map(s) to be renamed
  24. labels paint label file(s) to be renamed
  25. region region definition(s) to be renamed
  26. group imagery group(s) to be renamed
  27. </pre></div>
  28. <h2>NOTES</h2>
  29. If a data base element has support files (e.g., as is
  30. commonly the case with raster maps), these support files
  31. also are renamed.
  32. <p>
  33. If the user attempts to rename a file to itself by setting
  34. the <em>new</em> file name equal to the <em>old</em> file
  35. name (e.g., <b>g.rename raster=soils,soils</b>),
  36. <em>g.rename</em> will not execute the rename, but instead
  37. state that no rename is needed. However, <em>g.rename</em>
  38. will allow the user to overwrite other existing files in
  39. the current mapset by making the <em>new</em> file name
  40. that of an already existing file.
  41. <p>For portability reasons, <em>g.rename</em> is ignoring case of
  42. names. To change the case of a map name, first rename the map
  43. to a name which differs by more than case, then rename it to
  44. the intended name.
  45. <h2>EXAMPLE</h2>
  46. <div class="code"><pre>
  47. # rename raster map
  48. g.rename raster=oldrast,newrast
  49. # rename vector map
  50. g.rename vector=oldvect,newvect
  51. # combined renaming
  52. g.rename raster=oldrast,newrast vector=oldvect,newvect
  53. </pre></div>
  54. <h2>SEE ALSO</h2>
  55. <em>
  56. <a href="g.copy.html">g.copy</a>,
  57. <a href="g.list.html">g.list</a>,
  58. <a href="g.remove.html">g.remove</a>
  59. </em>
  60. <h2>AUTHOR</h2>
  61. Michael Shapiro,
  62. U.S.Army Construction Engineering
  63. Research Laboratory
  64. <p><i>Last changed: $Date$</i><p>