g.rename.html 2.4 KB

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