2009年6月28日 星期日

xargs experience

Step 1:
change to the directory which the tcpreplay file was located.
# ls | awk '{print "echo filename:"$1" ; tcpdump -nv host 207.46.2.152 -r "$1}' | sh
# ls | xargs -n 1 tcpdump -nv host 207.46.2.152 -r

Disable the write permission of all the directory include the sub-directory
# find -type d | xargs chmod a-w

Delete all the files that are below the CVS directory
# find ./* -name CVS | xargs -n 1 rm -rf

Delete all the found *.la files
# find /PathTOHere/puma5_toolchain/src/buildroot-2009.02/project_build_armeb/puma5/root/lib -name '*.la' | xargs rm -rf

沒有留言: