GMTWHICH(1gmt) | GMT | GMTWHICH(1gmt) |
gmtwhich - Find full path to specified files
gmtwhich files [ -A ] [ -C ] [ -D ] [ -G ] [ -V[level] ]
Note: No space is allowed between the option flag and the associated arguments.
gmtwhich reports the full paths to the files given on the command line. We look for the file in (1) the current directory, (2) in $GMT_USERDIR (if defined), (3) in $GMT_DATADIR (if defined), or (4) in $GMT_CACHEDIR (if defined). If found we print the full path name to the file, just the directory (see -D), or a confirmation (see -C). The $GMT_USERDIR and $GMT_DATADIR environment variables can be colon-separated list of directories, and we search recursively down any directory that ends with / (i.e., /export/data is a single directory whereas /export/data/ will be searched recursively.)
To see the full path to the file myjunk.txt, use
gmt which myjunk.txt
To download the 10 arc-minute global relief file from the GMT data site, use
gmt which -G earth_relief_10m.grd
which will print the path (after downloading if not already present). The file will be placed in the user's GMT_USER_DIR. To obtain a GMT example or test file from the GMT cache site, try
gmt which -G @hotspots.txt
which will print the path (after downloading if not already present). The file will be placed in the user's GMT_CACHE_DIR directory.
gmt
2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
May 21, 2019 | 5.4.5 |