# 1
안녕하세요. 넷사랑컴퓨터 기술지원입니다. 사용하는 쉘에 따라 history 기능을 설정하는 명령은 다음과 같습니다.

tcsh : bindkey -e 
ksh, bash : set -o emacs 


위의 명령을 실행하면 화살표 키로 예전에 실행했던 명령들을 불러올 수 있습니다. sh와 csh은 history 기능을 사용하기 어려우므로, 위의 쉘들을 사용하시기를 추천해 드립니다.

# 2
1. vi를 명령 행 편집기로 설정했는지 확인하십시오 (로그인 세션의 명령 행에 set -o vi 를 입력하거나, .profile 에 EDITOR 변수)를 vi로 설정합니다.
2 .ESC를 누르십시오.
3. 원하는 이전 명령으로 이동하려면 계속해서 K를 누르십시오.
4 .또는 J를 누르면, 명령 내역 목록에서 다음 명령으로 이동합니다.
5. 원하는 명령을 찾은 다음에는 현재 입력한 명령인 것처럼 편집할 수 있습니다.
6. 그런 다음 Enter 키를 눌러 명령 행에 있는 명령을 실행할 수 있습니다.

ksh
 PS1="[`hostname`:$LOGNAME] \$PWD > "
 
alias ls='ls -aF'
alias ll='ls -alF'
stty erase ^?
stty erase ^H

set -o vi
#ESC+\ = autocomplete, will complete upto the non-unique character.
#ESC+* = space delimited list of all files that match the pattern you started with.
#ESC+/str = search the commandline history for str.
#ESC+n = search for the next occurance of str.
#ESC+k = go back one in the commandline history.
#ESC+j = go forward one in the commandline history.
#ESC+$ = go to the end of the current line
#ESC+0 = go to the beginning of the current line
#ESC+i = return to insert mode
#ESC+A = append to the end of the current line
#ESC+I = insert from the beginning of the current line
#ESC+fx = move cursor to the right until the next occurance of x
#ESC+Fx = move cursor to the left until the next occurance of x
#ESC+x = delete character under cursor and place it in the buffer
#ESC+p = place the contents of the buffer after the cursor
#(combining the last two keystrokes)
#ESC+xp = transpose two characters (I use this alot)
 
if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.
 
bash
#
# @(#)local.profile 1.6 98/02/06 SMI
#
stty -istrip
stty erase ^H
alias ls='ls -aF'
alias ll='ls -alF'
stty erase ^?
 
#
# If possible, start the windows system
#
if [ "`tty`" = "/dev/console" ] ; then
    if [ "$TERM" = "sun" -o "$TERM" = "AT386" ] ; then
 
        if [ ${OPENWINHOME:-""} = "" ] ; then
            OPENWINHOME=/usr/openwin
            export OPENWINHOME
        fi
 
   o ""
                                                                                                                                             echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)"
        sleep 5
                                                                                                                                             echo ""
        clear       # get rid of annoying cursor rectangle                                                                                   $   NWINHexitbin/open# logout after leaving windows system
 
    fi
fi
 
export PS1="[`uname -n`:\$PWD]"
export EDITOR=/usr/bin/vi
export LANG=ko
alias ga=GRABABB
alias gi=GRABION
alias gm=GETMODEM
alias gc=GETCONFIG
alias gl=GRABLG
alias pk=PEEK
alias ck=CHECKTIME
alias sc=SETCONFIG
alias gn=GETNODE

sh
export EDITOR=vi
export PS1="[\$PWD"]
stty erase ^h
stty kill ^U
#LANG=ko_KR.eucKR
#export LANG
set -o vi

stty erase ^H
alias ls='ls -aF'
alias ll='ls -alF'
stty erase ^?
alias oh='cd $ORACLE_HOME'
Posted by ilus


,