Skip to main content

Methods of viewing command history and reissuing commands

Contributors

Each CLI session keeps a history of all commands issued in it. You can view the command history of the session that you are currently in. You can also reissue commands.

To view the command history, you can use the history command.

To reissue a command, you can use the redo command with one of the following arguments:

  • A string that matches part of a previous command

    For example, if the only volume command you have run is volume show, you can use the redo volume command to reexecute the command.

  • The numeric ID of a previous command, as listed by the history command

    For example, you can use the redo 4 command to reissue the fourth command in the history list.

  • A negative offset from the end of the history list

    For example, you can use the redo -2 command to reissue the command that you ran two commands ago.

For example, to redo the command that is third from the end of the command history, you would enter the following command:

cluster1::> redo -3