xargs 명령어 사용법

기본 사용법

[root@localhost bugbear]# find /home/* -type d | xargs echo
/home/assassin /home/bugbear /home/cobolt /home/darkelf /home/darkknight /home/death_knight /home/gate /home/gate/shellcode /home/gate/rooting /home/giant /home/goblin /home/golem /home/gremlin /home/lost+found /home/nightmare /home/orc /home/orge /home/skeleton /home/succubus /home/troll /home/vampire /home/wolfman /home/xavius /home/zombie_assassin

-i 옵션을 통한 인자 변경

[root@localhost bugbear]# find /home/* -type d | xargs -i echo {}/
/home/assassin/
/home/bugbear/
/home/cobolt/
/home/darkelf/
/home/darkknight/
/home/death_knight/
/home/gate/
/home/gate/shellcode/
/home/gate/rooting/
/home/giant/
/home/goblin/
/home/golem/
/home/gremlin/
/home/lost+found/
/home/nightmare/
/home/orc/
/home/orge/
/home/skeleton/
/home/succubus/
/home/troll/
/home/vampire/
/home/wolfman/
/home/xavius/
/home/zombie_assassin/

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다