sudo !!
echo !! > new_script.sh
!! | grep Linux
Execute last command started with ls:
!ls
Arguments:
ls !^ # first arg of prev cmd
ls !$ # last arg of prev cmd
ls !* # all args of prev cmd
ls !ls:2 # second arg of prev ls cmd
Execute command with given history number:
!2039
Hide command from history (use space before cmd):
ls ~/eagle
No comments:
Post a Comment