search history without result running automatically


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers search history without result running automatically
# 1  
Old 09-29-2011
search history without result running automatically

Hi

I want to search the history of commands.
for the last use of eg.$ service httpd reload

$history = brings up the full list
$!serv = runs service httpd reload, if thast was the last command used with the string
$!?serv? = does the same as above

I do not want to run the command automatically, just bring up the best fit match to , for example, the string "serv". Then I want to choose whether to hit enter and run, or not.

I thought there was a keyboard shortcut to search history? but can't remember...
# 2  
Old 09-30-2011
Press
Quote:
ctrl + r
and type the keyword. It will auto list your history commands
This User Gave Thanks to itkamaraj For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scheduled job not running automatically in crontab

i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Discussion started by: Santhosh CJ
6 Replies

2. AIX

Error running the history command

When I try to run the history command from the prompt i get the following error: $ history ksh: cd: 0403-011 The specified substitution is not valid for this command. ON running history with a parameter I get the following $ history -10 ksh: cd: 0403-008 The number of parameters... (6 Replies)
Discussion started by: meetzap
6 Replies

3. UNIX for Dummies Questions & Answers

Automatically Running Scripts

Can someone advise me how to get started automatically running scripts? I believe it has something to do with cron? (4 Replies)
Discussion started by: jeffreydavisjr
4 Replies

4. Shell Programming and Scripting

stop users from running 'history -c' in Linux

Hi All, My question is how can i stop my users on system from deleting their history. How can i stop the users from running 'history -c'. I have searched thoroughly on the forum but didn't find any satisfactory solution to the problem. kindly help if you any suggestions Thanx in... (3 Replies)
Discussion started by: xander
3 Replies

5. UNIX for Dummies Questions & Answers

Search in command history

Hi Guys, This one is, seemingly, a very simple question. I am on HPUX1572. The shell used is ksh. I used to locate a command using esc-K '/' followed by a few letters of the command. I tried to search my command history using ESC-K, it works fine. But the old trick of esp+K '/' doesnt... (0 Replies)
Discussion started by: n_rajitr
0 Replies

6. Shell Programming and Scripting

Search for a pattern from the result of search

I want to search for a pattern in a file based on the result of search. For example, grep '05-Dec' filename.ext For searching 'Exception' pattern, I used, grep 'Exception' filename.ext Anyway, these two worked successfully when run individually. But I want to search the... (3 Replies)
Discussion started by: boopathi_d
3 Replies

7. Shell Programming and Scripting

Running shell scripts automatically without using Batch or at commands

I have been trying to run a unix script which contains many sql statements.I need to run this script every monday morning. I tried to run on command prompt, it works fine. But while I run it via batch or at command., it returns with library module could not be loaded (libcompat.1.o could not be... (3 Replies)
Discussion started by: ritzwan0
3 Replies

8. UNIX for Dummies Questions & Answers

How do I search my history?

Hi, I'm using secure shell, ssh. How do I search for specific words in my history? For instance, I want to search for a command I made a few days ago. I can't get to the command with my arrow keys. Let's say I want to find a command containing the word dapl. Thanks, Jillian (3 Replies)
Discussion started by: antiDerivative
3 Replies

9. Shell Programming and Scripting

Running a program automatically

How can I make a program run automatically at a certain time of day? My problem is I need to make a small backup program that will back up a few files every day? (3 Replies)
Discussion started by: jvadn0
3 Replies
Login or Register to Ask a Question