zzh@ZZHPC:~$ cat .bash_history zzh@ZZHPC:~$ echo $HISTFILESIZE ## in file 2000 zzh@ZZHPC:~$ echo $HISTSIZE ## in memory 1000 zzh@ZZHPC:~$ !8 ## execute the 8th command in history
zzh@ZZHPC:~$ pwd
/home/zzh
zzh@ZZHPC:~$ !! ## execute the previous command
pwd
/home/zzh
zzh@ZZHPC:~$ !-7 ## execute the 7th last command
zzh@ZZHPC:~$ !ping ## execute the last ping command (with its arguments)
zzh@ZZHPC:~$ !ping:p ## just print the last ping command (with its arguments), not execute it
zzh@ZZHPC:~$ history -d 6 ## delete the 6th command from history
zzh@ZZHPC:~$ history -c ## clean history