In Unix, !! is an alias for the previous command:
indibm202 21: date
Tue Nov 10 17:38:13 IST 2009
indibm202 22: !!
date
Tue Nov 10 17:38:16 IST 2009
indibm202 23:
What is the alias for the second most previous command?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If
tcshis anything likecsh(and I think it is), you should be able to just use:to execute the second-to-last command (
!!is shorthand for!-1).Alternatively, you could use
historyto check out your last few commands and then use:where
Nis the command number for the command you want to re-execute.