retrive commands on Solaris
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: retrive commands on Solaris

  1. #1
    Join Date
    Mar 2001
    Posts
    286
    On Solaris, how do I configure the environment so that I can use "up arrow" key to retrive the command that I just used. On NT command line, it's very easy to use and very handy!

  2. #2
    Join Date
    Nov 1999
    Posts
    226
    How to use on NT ?

    regards

  3. #3
    Join Date
    Mar 2001
    Posts
    635
    Hi

    On NT you will need to Install doskey fo example

    c:\>doskey

    Iam not sure of Solaris but I think you have to configure you shell first

    Regards
    Santosh

  4. #4
    Join Date
    Mar 2001
    Posts
    286
    On NT, open a DOS window. Go to "property" - "Options" and click the "Quick Edit" mode. that's it!

  5. #5
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    it's a shell feature, you have it on bash or tcsh, and each shell has it's own way of retrieving commands ... so the answer to your question is : use bash or tcsh, and if you use something else, for example ksh, then read the man to know how to retrieve commands

    BTW : I think that ksh (using set -o vi) has a much more powerful system ofmanaging old commands than the up/down arrows !!

  6. #6
    Join Date
    Feb 2001
    Location
    Kolkata- India
    Posts
    356
    hi!
    On solaris I do it by
    ksh -o vi
    There Nothing You cannot Do, The problem is HOW.

  7. #7
    Join Date
    Jan 2001
    Posts
    515

    ksh

    I think in the korn shell it is escape k.

  8. #8
    Join Date
    Feb 2001
    Posts
    123
    In the ksh, you will probably need to set up a couple of aliases if they are not already set (list aliases using the alias command), as follows:

    alias history='fc -l'
    alias r='fc -e -'

    This will then allow you to list previous commands by typing history, and recall a prev. command with r xxx (where xxx is either the number of the command in the history list, or the first few characters of the command).

    In addition if you issue the command set -o vi then you can use the escape key to get into 'command line editing mode' from there, use vi navigation keys (k for prev. command, j for next, l for cursor right, h for cursor left), and vi editing keys (x, p, r etc.) to modify commands.

    HTH

    David.

  9. #9
    Join Date
    Mar 2001
    Posts
    286
    How do I use this feature on C shell?

  10. #10
    Join Date
    Feb 2001
    Posts
    49
    Hi,

    Very simple use

    #bash
    You'll get bash prompt, there you can use 'up arrow'
    to get a command history.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width