g.rename(1grass)
π g.rename β the manual page, but make it cute π
okay bestie, gather round, because today we are talking about g.rename(1grass) β yes that's the real name, that's how the cool kids cite it, and yes it's exactly as iconic as it sounds. β¨
πΈ NAME πΈ
g.rename β renames data base element files in the user's current mapset.
π KEYWORDS π
general, map management, rename
β¨ SYNOPSIS β¨
g.rename
g.rename --help
g.rename [raster=from,to] [raster_3d=from,to] [vector=from,to]
[label=from,to] [region=from,to] [group=from,to] [--overwrite]
[--help] [--verbose] [--quiet] [--ui]
π Flags:
--overwriteβ let output files just bulldoze right over existing files, no questions asked--helpβ prints the usage summary so you're not out here guessing--verboseβ verbose module output, aka it tells you everything it's doing--quietβ quiet module output, aka it says nothing, mysterious queen behavior--uiβ forces the GUI dialog to launch, for the visual girlies
Parameters:
raster=from,toβ raster map(s) to be renamedraster_3d=from,toβ 3D raster map(s) to be renamedvector=from,toβ vector map(s) to be renamedlabel=from,toβ paint label file(s) to be renamedregion=from,toβ region definition(s) to be renamedgroup=from,toβ imagery group(s) to be renamed
πΌ DESCRIPTION πΌ
so like, g.rename lets you rename data base element files in the user's current mapset. that's the whole vibe. π¦
you can hand g.rename every single thing it needs straight on the command line, by specifying:
- the type of data base element you wanna rename β one or more of:
raster,raster_3d,vector,icon,labels,region, andgroup - the specific file element in the current mapset you're renaming (that's the old one)
- and the new name you're assigning to this file element (new) in the current mapset
then the file element old gets renamed to new. done. slay. π
not me knowing you can also just type g.rename --help with zero arguments and get a whole menu of existing data base element types and files to pick from for possible renaming. menu below, no cap:
raster raster map(s) to be renamed
raster_3d 3D raster map(s) to be renamed
vector vector map(s) to be renamed
labels paint label file(s) to be renamed
region region definition(s) to be renamed
group imagery group(s) to be renamed
β NOTES β
- if a data base element has support files (like, super commonly the case with raster maps), those support files get renamed too. the whole entourage travels together, iykyk. π
- if you try to rename a file to itself by setting the new name equal to the old name β like
g.rename raster=soils,soilsβg.renamewill not do the rename. instead it'll just tell you that no rename is needed. rude but fair. π - BUT β
g.renamewill let you overwrite other existing files in the current mapset by making the new file name that of an already existing file. yes, really. proceed with your main character energy and maybe some caution. π - for portability reasons,
g.renameis ignoring case of names. so if you wanna change the case of a map name, first rename the map to a name that differs by more than just case, then rename it to the name you actually wanted. two-step. little dance. iconic. π
π EXAMPLE π
# rename raster map
g.rename raster=oldrast,newrast
# rename vector map
g.rename vector=oldvect,newvect
# combined renaming
g.rename raster=oldrast,newrast vector=oldvect,newvect
look at that combined renaming. she's doing both at once. π
π«Ά SEE ALSO π«Ά
g.copy, g.list, g.remove
π AUTHOR π
Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
π₯ SOURCE CODE π₯
Available at: g.rename source code (history)
Latest change: Thursday May 08 14:35:40 2025 in commit: 9528b1e38ba37992c1597a979dc3efbb07b74ec5
Main index | General index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie!! π this loveliness is Β© 2003-2026 GRASS Development Team, straight out of the GRASS 8.5.0 Reference Manual, and yes the version really is GRASS 8.5.0 β the g.rename(1grass) agenda stays winning. mwah. π
β¨πΈ
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms