A useful feature of UNIX is the ability to recall previous UNIX commands. Recent commands are stored and can be displayed as a numbered list by typing:-
historyCommands starting with the ! character can recall them. Some simple examples are:-
!n | execute nth command, e.g. !5 |
!! | execute previous command |
!-n | execute previous nth command, e.g. !-1 (is same as !!) |
!string | execute command that start with string e.g. !cp |