trap的使用
时间:2006-01-08 来源:ruiqingzheng
#!/bin/bash trap 'rm tmp*;echo "all tmp file is deleted !";exit' 2 n=1 while : ; do echo creat tmpfile... dd if=/dev/zero of=tmp$n bs=1 count=1 2>/dev/null ((n++)) ls tmp* sleep 0.5 done |
#!/bin/bash |
相关阅读 更多 +
排行榜 更多 +