Previous command | Unix Linux Forums | HP-UX

  Unix/Linux Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Previous command

HP-UX


Tags
linux

Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-11-2008
new2ss new2ss is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 23 January 2014, 8:51 PM EST
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
Previous command

Hi,

i would like to retrieve (only retrieve, not execute) a previous command which i executed on the command prompt. I tried the 'up arrow' key, but its not working. Instead,it showed me some funny characters. I searched around and i found the way to do it was using the way below. Several websites quoted as saying ".. using control key ^P .. ". What keys do i type to get the control P ? I tried shift + P and Ctrl + P, neither worked.
Sponsored Links
    #2  
Old Unix and Linux 02-12-2008
HPAVC's Unix or Linux Image
HPAVC HPAVC is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 29 October 2009, 8:14 AM EDT
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
What shell and TERM?
Sponsored Links
    #3  
Old Unix and Linux 02-12-2008
vbe's Unix or Linux Image
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 28 March 2015, 6:51 AM EDT
Location: Switzerland - GE
Posts: 6,024
Thanks: 182
Thanked 452 Times in 423 Posts
What shell are you using?

On hpux normally it would be Esc+k (previous, previous...) or Esc +j (forward...)

Or you can type history...
    #4  
Old Unix and Linux 02-14-2008
new2ss new2ss is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 23 January 2014, 8:51 PM EST
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
I got the following output when i did a
Code:
echo $0
/bin/ksh

I suppose its k shell? In this case, what should be the key to retrieve the last command?
Sponsored Links
    #5  
Old Unix and Linux 02-14-2008
GaneshB GaneshB is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 23 January 2009, 7:01 AM EST
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
How to Check the Os error messages in HP-UNIX

Unix or Linux Image
Hi ,
Can anybody help me for checking the OS error messages in HP-UNIX Servers like /var/adm/messages in linux servers ..
Sponsored Links
    #6  
Old Unix and Linux 02-14-2008
Tytalus's Unix or Linux Image
Tytalus Tytalus is offline Forum Advisor  
echo {1..9}^2\;|bc
 
Join Date: Jun 2003
Last Activity: 10 January 2014, 5:37 AM EST
Location: Scotland
Posts: 594
Thanks: 1
Thanked 28 Times in 27 Posts
In ksh

if you are in vi mode (i.e. have set -o vi ), use

Code:
ESC and k (or ESC and -) to move back, or  
ESC and j to move forward ( or ESC and + )

If you have set -o emacs, or gmacs, use

Code:
control-p for previous command and 
control-n for next command.

HTH,
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Previous Command vskr72 UNIX for Dummies Questions & Answers 2 04-20-2007 11:03 AM
Previous Command vskr72 Shell Programming and Scripting 1 04-19-2007 07:04 PM
Previous Command vskr72 UNIX for Advanced & Expert Users 0 04-19-2007 06:51 PM
Seeing previous command JackieChan UNIX for Dummies Questions & Answers 4 06-02-2006 09:35 AM
getting the previous command luft UNIX for Dummies Questions & Answers 5 08-18-2005 11:02 AM



All times are GMT -4. The time now is 08:16 AM.