September 2011 Archives

find and exec

first we can use find's exec opiton

find . -name CVS -exec ls -dl {} \;

also we can use shell

for i in `find . -name CVS` ; do echo -n $i," "; done

change ls, echo to whatever suits you, like rm -rf

cmd to compare contents of two directories

diff -qr dir1 dir2

About Michael Li

user-pic I blog issues resolved at work