The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
History command akash_wagh Filesystems, Disks and Memory 2 01-22-2009 12:51 PM
Help with the History command cleansing_flame UNIX for Dummies Questions & Answers 2 02-04-2008 12:25 PM
Command history a25khan UNIX for Dummies Questions & Answers 8 12-10-2003 06:05 AM
command history vikasdeshmukh UNIX for Dummies Questions & Answers 3 11-14-2001 05:37 AM
History Command jack UNIX for Dummies Questions & Answers 2 08-01-2001 01:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-18-2006
priya_v111 priya_v111 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 3
Command history in AIX

Hi All,

I would like to know how to get the command history from the prompt. For example in dos, if we hit the Up Arrow, we get the previous command. I am not getting this in my telnet session (AIX) at the prompt.

I know that if I type history command it will give a list of cammands I typed earlier. But what i need is the short cut key were like the up arrow in dos were in i will get the previous command at the prompt.

Thanks in advance...

Priya
  #2 (permalink)  
Old 09-18-2006
BOFH BOFH is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
Assuming your shell is ksh and you're used to vi:

Code:
$ set -o vi
$ <esc>k
Basically the set command sets your keyboard to use the same basic key commands you can use in vi to get arround. The esc key puts you into command mode just like in vi. From there you can use 'k' to move up in the history, 'j' to move down, 'l' to move left and 'h' to move right. You can also hit '/search term' to search for a command. Those are the ones I use most of the time.

You can also set -o emacs if you know the keystrokes for emacs.

Carl
  #3 (permalink)  
Old 09-18-2006
priya_v111 priya_v111 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 3
It worked....

Thank you very much Carl.....

Priya
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0