g.list(1grass)
β¨ NAME β¨
okay so bestie, meet g.list β the page you're reading is officially g.list(1grass) out of the GRASS User's Manual, and her whole personality is this: she lists available GRASS data base files of the user-specified data type, and if you want, she'll do it with a search pattern too. literally the friend who can find anything in the receipts π
πΈ KEYWORDS πΈ
general, map management, list, search β that's the vibe check, and she passes it π
π¦ 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] [format=name] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π Flags π
-iβ ignore case, bestie. she's not gonna be picky about your caps π«Ά-rβ use basic regular expressions instead of wildcards. glow up from wildcards, gorgeous β¨-eβ use extended regular expressions instead of wildcards. even MORE regex energy π₯-tβ print data types. she tells you what each thing is, not just its name π-mβ print fully-qualified map names (including mapsets). no more "which mapset tho" mystery π-pβ pretty printing in human readable format [deprecated]
π¨ this flag is deprecated and will be removed in a future release. theplainformat will become the default. useformat="plain"to set it explicitly in a script. ok so like, stop using it, fr fr π
-fβ verbose listing (also list map titles) [deprecated]
π¨ this flag is deprecated and will be removed in a future release. use the type-specific tool to obtain metadata, such asr.infoandv.info. she's moving on, and honestly? valid π
--overwriteβ allow output files to overwrite existing files (chaotic, but consensual)--helpβ print usage summary. the "what does this even do" button π--verboseβ verbose module output. she talks more, you learn more π¦--quietβ quiet module output. she whispers. minimalism era π--uiβ force launching GUI dialog. for the girlies who need a window πΈ
π Parameters π
type=datatype[,datatype,...][required] β data type(s). options:raster,raster_3d,vector,label,region,group,allraster: 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
pattern=stringβ map name search pattern (default: all)exclude=stringβ map name exclusion pattern (default: none). the "not you, girl" filter π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 outputformat=nameβ output format. options:plain,shell,jsonplain: Human readable text outputshell: shell script style text outputjson: JSON (JavaScript Object Notation)
π DESCRIPTION π
g.list searches for data files matching a pattern given by wildcards or POSIX Extended Regular Expressions. that's it, that's the whole serve. periodt β¨
π 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. she's not just pretty, she's interoperable π
β 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.
π₯ SEE ALSO π₯
r.series, t.list, t.rast.list, t.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)
Latest change: Thursday Oct 02 14:39:13 2025 in commit: 1850489bf42c72d8dcfe2e4db1738441b4a7dc43
Main index | General index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page babes π«Ά GRASS 8.5.0, signed off on Thursday Oct 02 14:39:13 2025 β she served, she listed, she left no map behind. go run her, bestie, you're gonna eat π β¨π
π¦ 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