Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there any way to save the commands typed and the outputs obtained in terminal under GRASS GIS to a text file? I have read that GRASS saves history for each mapset but I have no much idea about how to obtain that.

Although there is "Save Output" in "Command Console" in GRASS GIS Layer Manager, many times I have faced a situation when the saved output has only one line!

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Three command history logs are available within each mapset.

Inside the hist directory, you will find command logs for each raster layer.

Within the sub-directories vector, you will find the command logs for each vector layer.

There is also .bash_history file in the main mapset directory for all commands logs you used during a GRASS session.

All of them are simple text files.

share|improve this answer
    
They were really useful inputs. But I ran r.covar and the output obtained is not found on .bash_history. Is there any other directory where they get stored or do I have to export the output exclusively to a file. –  Chethan S. Mar 10 '11 at 8:29
    
.bash_history is usually save when you exit/finish a GRASS session. –  maning Mar 10 '11 at 8:33
    
I checked after exiting as well. But only exit is shown after my r.covar inputs. –  Chethan S. Mar 10 '11 at 8:35
1  
Do you mean to save the r.covar output or the command itself? To save the command output, try r.covar map=mapx > file.txt –  maning Mar 10 '11 at 8:46
    
Alright, thank you. Its mainly to save the output but at times I have to look back into commands typed in previous sessions as well. –  Chethan S. Mar 10 '11 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.