보관용

[BusyBox] history 기능

크크다스 2014. 11. 14. 15:15
반응형

= [BusyBox] hsitory 기능

= 관련 소스

busybox-1.01/shell/ash.c

busybox-1.01/shell/cmdedit.c

= 관련 BusyBox Config

CONFIG_FEATURE_COMMAND_SAVEHISTORY

CONFIG_FEATURE_COMMAND_HISTORY

= 관련 변수 : 전체 history num 용 변수 필요
    static char *history[MAX_HISTORY+1]; /* history + current */
    /* saved history lines */
    static int n_history;
    /* current pointer to history line */
    static int cur_history;

= history 화일 위치

ash(sh) 시작시

HOME정의 => $HOME/.ash_history => HISTFILE에 저장

ash(sh)종료시

HISTFILE가 정의 되어 있으면 해당 위치에 히스토리 저장

= histroy 갯수 : 기본 15개

반응형