ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 파일 리다이렉션
    bin/script 2007. 11. 22. 11:56
    1. tee 로 stdout 을 파일과 stdout 둘 다에 출력
    기본: ls -ali b| tee b.backup
    응용: ls -ali b 2>&1 | tee -a b.backup

    2. time redirection
    time dd if=/dev/zero of=/dev/zero bs=4096 count=1 > ouptut 2>&1
    dd 명령결과만 redirection 한다.

    2-1) gnu 옵션 sbin/time
    http://kldp.org/node/83317
    time 은 shell builtin 이므로, 옵션을 사용하려면 풀 패스로 실행
    # /usr/bin/time -ao output dd if=/root/anaconda-ks.cfg of=/dev/zero bs=4096 count=1 >> output 2>&1

    2-2) shell builtin time
    http://onepoint.tistory.com/85
    # sh -c "time dd if=/dev/zero of=/dev/zero bs=4096 count=1" > output 2>&1



Designed by Tistory.