blob: aa625c2d049585fa344f3193ae53b597964f2671 [file] [log] [blame]
---
title: history
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
Show or save the command history.
This history can be saved to a file which can also be used as a script later.
A history of commands that have been executed successfully is also logged in
the `.geode/.gfsh.history` file within the home directory of
the user running gfsh.
**Availability:** Online or offline.
**Syntax:**
``` pre
history [--file=<history text file>]
```
<a id="concept_3C89B4C4D3EA47DE9CB046286D26F0BC__table_onp_pfg_2w"></a>
| Name | Description | Default Value |
|---------|----------------------------------------------------------|---------------|
| \\-\\-file | File to which the history is to be saved. |   |
| \\-\\-clear | When set to `true`, clears the history of gfsh commands. | false |
<span class="tablecap">Table 1. History Parameters</span>
**Example Commands:**
``` pre
history
history --file=./mycommands.gfsh;
```
**Sample Output:**
``` pre
gfsh>history --file=./mycommands.gfsh
Wrote successfully to file ./mycommands.gfsh
```