1g.list(1)                     Grass User's Manual                    g.list(1)
2
3
4

NAME

6       g.list   -  Lists available GRASS data base files of the user-specified
7       data type optionally using the search pattern.
8

KEYWORDS

10       general, map management, list, search
11

SYNOPSIS

13       g.list
14       g.list --help
15       g.list   [-iretmpf]   type=datatype[,datatype,...]     [pattern=string]
16       [exclude=string]     [mapset=name[,name,...]]     [separator=character]
17       [region=name]   [output=name]    [--overwrite]   [--help]   [--verbose]
18       [--quiet]  [--ui]
19
20   Flags:
21       -i
22           Ignore case
23
24       -r
25           Use basic regular expressions instead of wildcards
26
27       -e
28           Use extended regular expressions instead of wildcards
29
30       -t
31           Print data types
32
33       -m
34           Print fully-qualified map names (including mapsets)
35
36       -p
37           Pretty printing in human readable format
38
39       -f
40           Verbose listing (also list map titles)
41
42       --overwrite
43           Allow output files to overwrite existing files
44
45       --help
46           Print usage summary
47
48       --verbose
49           Verbose module output
50
51       --quiet
52           Quiet module output
53
54       --ui
55           Force launching GUI dialog
56
57   Parameters:
58       type=datatype[,datatype,...] [required]
59           Data type(s)
60           Options: raster, raster_3d, vector, label, region, group, all
61           raster: raster map(s)
62           raster_3d: 3D raster map(s)
63           vector: vector map(s)
64           label: paint label file(s)
65           region: region definition(s)
66           group: imagery group(s)
67           all: all types
68
69       pattern=string
70           Map name search pattern (default: all)
71
72       exclude=string
73           Map name exclusion pattern (default: none)
74
75       mapset=name[,name,...]
76           Name of mapset to list (default: current search path)
77           ’.’ for current mapset; ’*’ for all mapsets in location
78
79       separator=character
80           Field separator
81           Special characters: pipe, comma, space, tab, newline
82           Default: newline
83
84       region=name
85           Name of saved region for map search (default: not restricted)
86           ’.’ for current region; ’*’ for default region
87
88       output=name
89           Name for output file
90           If not given or ’-’ then standard output
91

DESCRIPTION

93       g.list searches for data files matching a pattern given by wildcards or
94       POSIX Extended Regular Expressions.
95

NOTES

97       The output of g.list may be useful for other programs’ parameter  input
98       (e.g. time series for r.series) when used with separator=comma.
99

EXAMPLES

101       List all raster maps as continuous, sorted list:
102       g.list type=rast
103       List  all vector maps as continuous, sorted list with MAPSET info (i.e.
104       fully-qualified map names):
105       g.list type=vector -m
106       List all raster and vector maps ordered by mapset:
107       g.list type=raster -p
108       List all raster and vector maps as continuous, sorted list:
109       g.list type=rast,vect
110       List all available GRASS data base files:
111       g.list type=all
112
113   Mapset search path
114       If mapset is not specified, then g.list searches for data files in  the
115       mapsets  that  are  included in the search path (defined by g.mapsets).
116       See g.mapsets -p.
117       g.list rast -p
118       raster map(s) available in mapset <user1>:
119       dmt
120       ...
121       raster map(s) available in mapset <PERMANENT>:
122       aspect
123       ...
124       Option mapset=. (one dot)  lists  only  data  files  from  the  current
125       mapset:
126       g.list rast mapset=.
127       ...
128       Similarly, mapset=* (one asterisk) prints data files from all available
129       mapsets also including those that are not listed in the current  search
130       path (see g.mapsets -l).
131       g.list rast mapset=* -p
132       raster map(s) available in mapset <landsat>:
133       lsat5_1987_10
134       ...
135       raster map(s) available in mapset <user1>:
136       dmt
137       ...
138       raster map(s) available in mapset <PERMANENT>:
139       aspect
140       ...
141
142   Wildcards
143       List all vector maps starting with letter "r":
144       g.list type=vector pattern="r*"
145       List all vector maps starting with letter "r" or "a":
146       g.list type=vector pattern="[ra]*"
147       List all raster maps starting with "soil_" or "landuse_":
148       g.list type=raster pattern="{soil,landuse}_*"
149       List certain raster maps with one variable character/number:
150       g.list type=raster pattern="N45E00?.meters"
151       Use of exclude parameter:
152       # without exclude:
153         g.list rast pat="r*" mapset=PERMANENT
154         railroads
155         roads
156         rstrct.areas
157         rushmore
158       # exclude only complete word(s):
159         g.list rast pat="r*" exclude=roads mapset=PERMANENT
160         railroads
161         rstrct.areas
162         rushmore
163       # exclude with wildcard:
164         g.list rast pat="r*" exclude="*roads*" mapset=PERMANENT
165         rstrct.areas
166         rushmore
167
168   Regular expressions
169       List all soil maps starting with "soils" in their name:
170       g.list -r type=raster pattern=’^soils’
171       List "tmp" if "tmp" raster map exists:
172       g.list -r type=raster pattern=’^tmp$’
173       List "tmp0" ..."tmp9" if corresponding vector map exists (each map name
174       linewise):
175       g.list -r type=vector pattern=’^tmp[0-9]$’
176       List "tmp0"..."tmp9" if corresponding vector map exists (each map  name
177       comma separated):
178       g.list -r type=vector separator=comma pattern=’^tmp[0-9]$’
179
180   Extended regular expressions
181       List all precipitation maps for the years 1997-2012, comma separated:
182       g.list -e type=raster separator=comma pattern="precip_total.(199[7-9]|200[0-9]|201[0-2]).sum"
183
184   Maps whose region overlaps with a saved region
185       List  all  raster  maps starting with "tmp_" whose region overlaps with
186       the region of "test" raster map:
187       g.region raster=test save=test_region
188       g.list type=raster pattern=’tmp_*’ region=test_region
189       List "tmp0"..."tmp9" vector maps whose region overlaps with the current
190       region:
191       g.list -r type=vector pattern=’^tmp[0-9]$’ region=.
192       List  all raster and vector maps whose region overlaps with the default
193       region of the PERMANENT mapset in the current location (DEFAULT_WIND):
194       g.list type=rast,vect region=*
195       Note that, without region=*, g.list  type=rast,vect  simply  lists  all
196       available  raster  and vector maps from the current search path regard‐
197       less of their region.
198

SEE ALSO

200        r.series, t.list, t.rast.list, t.vect.list
201
202       Regular expressions (aka regex) - from Wikipedia, the free encyclopedia
203

AUTHOR

205       Huidae Cho
206       grass4u@gmail.com
207       based on general/manage/cmd/list.c by Michael Shapiro
208

SOURCE CODE

210       Available at: g.list source code (history)
211
212       Main index | General index | Topics index | Keywords index |  Graphical
213       index | Full index
214
215       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
216
217
218
219GRASS 7.8.2                                                          g.list(1)
Impressum