1g.rename(1) GRASS GIS User's Manual g.rename(1)
2
3
4
6 g.rename - Renames data base element files in the user’s current
7 mapset.
8
10 general, map management, rename
11
13 g.rename
14 g.rename --help
15 g.rename [raster=from,to] [raster_3d=from,to] [vector=from,to]
16 [label=from,to] [region=from,to] [group=from,to] [--overwrite]
17 [--help] [--verbose] [--quiet] [--ui]
18
19 Flags:
20 --overwrite
21 Allow output files to overwrite existing files
22
23 --help
24 Print usage summary
25
26 --verbose
27 Verbose module output
28
29 --quiet
30 Quiet module output
31
32 --ui
33 Force launching GUI dialog
34
35 Parameters:
36 raster=from,to
37 raster map(s) to be renamed
38
39 raster_3d=from,to
40 3D raster map(s) to be renamed
41
42 vector=from,to
43 vector map(s) to be renamed
44
45 label=from,to
46 paint label file(s) to be renamed
47
48 region=from,to
49 region definition(s) to be renamed
50
51 group=from,to
52 imagery group(s) to be renamed
53
55 g.rename allows the user to rename data base element files in the
56 user’s current mapset. The user can specify all necessary information
57 to g.rename on the command line, by specifying: the type of data base
58 element to be renamed (one or more of: raster, raster_3d, vector,
59 icon, labels, region, and group); the specific file element in the cur‐
60 rent mapset to be renamed (old); and the new name to be assigned to
61 this file element (new) in the current mapset. The file element old is
62 then renamed to new.
63
64 Users can also simply type g.rename --help without arguments on the
65 command line, to receive a menu of existing data base element types and
66 files from which to choose for possible renaming:
67 raster raster map(s) to be renamed
68 raster_3d 3D raster map(s) to be renamed
69 vector vector map(s) to be renamed
70 labels paint label file(s) to be renamed
71 region region definition(s) to be renamed
72 group imagery group(s) to be renamed
73
75 If a data base element has support files (e.g., as is commonly the case
76 with raster maps), these support files also are renamed.
77
78 If the user attempts to rename a file to itself by setting the new file
79 name equal to the old file name (e.g., g.rename raster=soils,soils),
80 g.rename will not execute the rename, but instead state that no rename
81 is needed. However, g.rename will allow the user to overwrite other
82 existing files in the current mapset by making the new file name that
83 of an already existing file.
84
85 For portability reasons, g.rename is ignoring case of names. To change
86 the case of a map name, first rename the map to a name which differs by
87 more than case, then rename it to the intended name.
88
90 # rename raster map
91 g.rename raster=oldrast,newrast
92 # rename vector map
93 g.rename vector=oldvect,newvect
94 # combined renaming
95 g.rename raster=oldrast,newrast vector=oldvect,newvect
96
98 g.copy, g.list, g.remove
99
101 Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
102
104 Available at: g.rename source code (history)
105
106 Accessed: Saturday Jan 21 21:14:21 2023
107
108 Main index | General index | Topics index | Keywords index | Graphical
109 index | Full index
110
111 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
112
113
114
115GRASS 8.2.1 g.rename(1)