본문 바로가기
보관용

[BusyBox] hsitory 기능

by 크크다스 2014. 11. 14.
반응형

= [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개

반응형

'보관용' 카테고리의 다른 글

[Netlink] A to Z  (0) 2014.11.14
[popen & pipe & dup] 좋은 예  (0) 2014.11.14
[jiffies] 값에 대한 단상  (0) 2014.11.14
[sHash] Simple Hash  (0) 2014.11.10
[MySQL] Desc /Asc index => 지정 안된다 => 우회방법  (0) 2014.11.08