The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Examples of running a command from the history list

To re-run the previous command:

   history
      1  pwd
      2  cp memo.txt /tmp
      3  cd
      4  history
   !!
      1  pwd
      2  cp memo.txt /tmp
      3  cd
      4  history
      5  history

The history command is used to list the command history. Then the previous command is reexecuted, listing the command history again!


To re-run a specific command:

   !3
   cd

This re-runs command number three (3) in the command history.


To re-run the most recent command that starts with a particular character string:

   !pw
   pwd
   /home/grace

This re-runs the command pwd.


To re-run the most recent command that contains a particular character string:

   !?st
   history

This re-runs the history command.


[Home] [Search] [Index]



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру