g.list(1)
g.list π β¨
okay bestie, welcome to g.list β the GRASS GIS User's Manual page for it, no cap. It lives in the GRASS GIS User's Manual and it's here to hand you a list of your GRASS database files of whatever data type you asked for, optionally filtered by a search pattern. it's giving β¨map managementβ¨ and honestly? iconic.
π KEYWORDS π
general, map management, list, search β iykyk π
πΈ SYNOPSIS πΈ
g.list
g.list --help
g.list [-iretmpf] type=datatype[,datatype,...] [pattern=string]
[exclude=string] [mapset=name[,name,...]] [separator=character]
[region=name] [output=name] [--overwrite] [--help] [--verbose]
[--quiet] [--ui]
π¦ Flags π¦
-iβ ignore case, bestie. like, don't be so picky π-rβ use basic regular expressions instead of wildcards-eβ use extended regular expressions instead of wildcards-tβ print data types-mβ print fully-qualified map names (including mapsets), so you get the whole name AND the mapset. the full lore fr fr-pβ pretty printing, human readable format π-fβ verbose listing (also list map titles)--overwriteβ allow output files to overwrite existing files (careful, girl π)--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output π€«--uiβ force launching GUI dialog
π Parameters π
type=datatype[,datatype,...][required] β data type(s). this one's mandatory, no skipping π- Options:
raster,raster_3d,vector,label,region,group,all raster: raster map(s)raster_3d: 3D raster map(s)vector: vector map(s)label: paint label file(s)region: region definition(s)group: imagery group(s)all: all types β¨
- Options:
pattern=stringβ map name search pattern (default: all)exclude=stringβ map name exclusion pattern (default: none)mapset=name[,name,...]β name of mapset to list (default: current search path).'.'for current mapset;'*'for all mapsets in locationseparator=characterβ field separator. Special characters:pipe,comma,space,tab,newline. Default:newlineregion=nameβ name of saved region for map search (default: not restricted).'.'for current region;'*'for default regionoutput=nameβ name for output file. If not given or'-'then standard output
π DESCRIPTION π
g.list searches for data files matching a pattern given by wildcards or POSIX Extended Regular Expressions. that's the whole vibe, bestie. search, match, list. π
β NOTES β
The output of g.list may be useful for other programs' parameter input (e.g. time series for r.series) when used with separator=comma. so like, it's not just pretty β it's feeding other modules too. teamwork makes the dream work π«Ά
π§ EXAMPLES π§
List all raster maps as continuous, sorted list:
g.list type=rast
List all vector maps as continuous, sorted list with MAPSET info (i.e. fully-qualified map names):
g.list type=vector -m
List all raster and vector maps ordered by mapset:
g.list type=raster -p
List all raster and vector maps as continuous, sorted list:
g.list type=rast,vect
List all available GRASS data base files:
g.list type=all
π Mapset search path π
If mapset is not specified, then g.list searches for data files in the mapsets that are included in the search path (defined by g.mapsets). See g.mapsets -p.
g.list rast -p
raster map(s) available in mapset <user1>:
dmt
...
raster map(s) available in mapset <PERMANENT>:
aspect
...
Option mapset=. (one dot) lists only data files from the current mapset:
g.list rast mapset=.
...
Similarly, mapset=* (one asterisk) prints data files from all available mapsets also including those that are not listed in the current search path (see g.mapsets -l).
g.list rast mapset=* -p
raster map(s) available in mapset <landsat>:
lsat5_1987_10
...
raster map(s) available in mapset <user1>:
dmt
...
raster map(s) available in mapset <PERMANENT>:
aspect
...
πΈ Wildcards πΈ
List all vector maps starting with letter "r":
g.list type=vector pattern="r*"
List all vector maps starting with letter "r" or "a":
g.list type=vector pattern="[ra]*"
List all raster maps starting with "soil_" or "landuse_":
g.list type=raster pattern="{soil,landuse}_*"
List certain raster maps with one variable character/number:
g.list type=raster pattern="N45E00?.meters"
Use of exclude parameter:
# without exclude:
g.list rast pat="r*" mapset=PERMANENT
railroads
roads
rstrct.areas
rushmore
# exclude only complete word(s):
g.list rast pat="r*" exclude=roads mapset=PERMANENT
railroads
rstrct.areas
rushmore
# exclude with wildcard:
g.list rast pat="r*" exclude="*roads*" mapset=PERMANENT
rstrct.areas
rushmore
π Regular expressions π
List all soil maps starting with "soils" in their name:
g.list -r type=raster pattern=β^soilsβ
List "tmp" if "tmp" raster map exists:
g.list -r type=raster pattern=β^tmp$β
List "tmp0" ..."tmp9" if corresponding vector map exists (each map name linewise):
g.list -r type=vector pattern=β^tmp[0-9]$β
List "tmp0"..."tmp9" if corresponding vector map exists (each map name comma separated):
g.list -r type=vector separator=comma pattern=β^tmp[0-9]$β
β¨ Extended regular expressions β¨
List all precipitation maps for the years 1997-2012, comma separated:
g.list -e type=raster separator=comma pattern="precip_total.(199[7-9]|200[0-9]|201[0-2]).sum"
π Maps whose region overlaps with a saved region π
List all raster maps starting with "tmp_" whose region overlaps with the region of "test" raster map:
g.region raster=test save=test_region
g.list type=raster pattern=βtmp_*β region=test_region
List "tmp0"..."tmp9" vector maps whose region overlaps with the current region:
g.list -r type=vector pattern=β^tmp[0-9]$β region=.
List all raster and vector maps whose region overlaps with the default region of the PERMANENT mapset in the current project (DEFAULT_WIND):
g.list type=rast,vect region=*
Note that, withoutregion=*,g.list type=rast,vectsimply lists all available raster and vector maps from the current search path regardless of their region. don't get it twisted, bestie π
π₯ SEE ALSO π₯
r.seriest.listt.rast.listt.vect.list- Regular expressions (aka regex) - from Wikipedia, the free encyclopedia
π«Ά AUTHOR π«Ά
Huidae Cho grass4u@gmail.com based on general/manage/cmd/list.c by Michael Shapiro
π SOURCE CODE π
Available at: g.list source code (history)
Accessed: Saturday Jan 17 05:40:39 2026
Main index | General index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π okay so for the cute little sign-off: this was GRASS 8.4.2, Β© 2003-2025 GRASS Development Team, from the GRASS GIS 8.4.2 Reference Manual, and the footer said GRASS 8.4.2 next to g.list(1). go list some maps, you absolute icon π
β¨π
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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