I'm re-doing my drainage basin analyses. There are several dozen raster
files in the mapset that I want to remove. Copying several to the g.remove
command (separated by commas) is slow. Is it possible to use a wildcard with
the g.remove command?
My tests suggest not, but perhaps there is a way to do this that is not
immediately obvious to me.
Rich
On Thu, 7 Jun 2012, Rich Shepard wrote:
Is it possible to use a wildcard with the g.remove command?
I just discovered g.mremove.
Rich
If the maps that you want to remove have some (pattern) in the map name,
you could remove it running this loop in the GRASS-Terminal.
Identified the path of the “hist” folder in your MAPSET
path example : /home/user/Grassdata/location/Mapset/hist
Now you could run:
cd /home/user/Grassdata/location/Mapset/hist
for i in pattern;
do
g.remove rast=$i
done
John Ortiz
Geologist
Smithsonian Tropical Research Institute
Ancon - Panama
Date: Thu, 7 Jun 2012 10:41:11 -0700
From: rshepard@appl-ecosys.com
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Removing Multiple Maps
I’m re-doing my drainage basin analyses. There are several dozen raster
files in the mapset that I want to remove. Copying several to the g.remove
command (separated by commas) is slow. Is it possible to use a wildcard with
the g.remove command?
My tests suggest not, but perhaps there is a way to do this that is not
immediately obvious to me.
Rich
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
On Thu, 7 Jun 2012, John Ortiz wrote:
If the maps that you want to remove have some (pattern) in the map name,
you could remove it running this loop in the GRASS-Terminal.
John,
That's essentially what g.mremove does. For example, g.mremove rast="bas*"
removes all raster maps beginning with 'bas'.
Rich