![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Repeat last entered command ? | vilius | Shell Programming and Scripting | 5 | 09-25-2007 07:15 AM |
| previous,next command in unix | arulkumar | UNIX for Dummies Questions & Answers | 4 | 09-11-2007 08:34 AM |
| Previous Command | vskr72 | UNIX for Dummies Questions & Answers | 2 | 04-20-2007 12:03 PM |
| Seeing previous command | JackieChan | UNIX for Dummies Questions & Answers | 4 | 06-02-2006 10:35 AM |
| Repeat a command in a shell | scotty | UNIX for Dummies Questions & Answers | 2 | 10-30-2002 02:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
In tcsh (and bash?) you can use
!! to execute the previous command again, !-n to execute again the nth to last command !foo to execute again the last command beginning with the string foo !?foo to execute again the last command containing the string foo Append Code:
:p |
|
||||
|
Repeat previous unix command
Thanks for your reply. I am using ksh.
In linux, if my last command is for example "ls -ltr |tail", I just hit the "arrow up " key to bring it (ls -ltr |tail) back on the command line and then verify it. This gives me the opportunity to display the command before executing it. The command 'r' that vbe suggests is good, but it is executed before I even have the opportunity to dsplay it. I need a command (or key stroke) in order to display and then repeat the execution without retyping the command. Any idea? Thanks! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|