Computing.Net > Forums > Solaris > Previous command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Previous command

Reply to Message Icon

Name: Truc Nguyen
Date: May 3, 2006 at 10:02:16 Pacific
OS: Solaris
CPU/Ram: 512
Comment:

Hi

In Unix, to get the previous command, I simply use the back arrow key on the keyboard to sroll back the history commands.

But Solaris does not have this action. Each time I execute a command, I have to re-type it. Do you know how to set up Solaris behave as Unix?

Thanks,



Sponsored Link
Ads by Google

Response Number 1
Name: sboffin
Date: May 5, 2006 at 11:47:48 Pacific
Reply:

In Unix type "history".
to repeat the last command at the prompt type "!!"

If you want trun the latest command starting with a l (like ls -al) type "!l"

If you want to execute a command specific of the history not the number and type !<number>

In my cshrc I have
alias h 'history \!* | head -39 | more'

so that I can type only "h" at the prompt and it will list only the last 40 commands.

Hope this helps


0

Response Number 2
Name: Glitchman
Date: May 10, 2006 at 13:20:33 Pacific
Reply:

Hit the Escape key, then lowercase k.


0

Response Number 3
Name: shipper99
Date: May 23, 2006 at 06:18:10 Pacific
Reply:

If you use tcsh shell then you just have to hit the up arrow key to repeat last command.


0

Response Number 4
Name: amol_pali
Date: July 11, 2006 at 03:05:27 Pacific
Reply:

Hi,
When u enter into terminal of Solaris u get
# prompt. Now type the shell u want to use
like if u want to use bash shell type bash.
u will get "bash-3.00#" prompt. Now this will work like unix simply press up arrow key to repeat previous commands.
I think u got your answer


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Previous command

repeat history command www.computing.net/answers/solaris/repeat-history-command/3171.html

Histroy in Solaris www.computing.net/answers/solaris/histroy-in-solaris/3240.html

mp command www.computing.net/answers/solaris/mp-command/3201.html