castanyes blaves

Random ramblings about some random stuff, and things; but more stuff than things -- all in a mesmerizing and kaleidoscopic soapbox-like flow of words.

1/19/2005

 
find commands

find . -name '*.c' | xargs grep 'write' # find *.c files with 'write'

find / -name csh -print # find file named "csh" anywhere

find . -name '*.c' -print # find all files ending in ".c"

find ~ -name a.out -print # find all a.out files

find ~ -name core -exec /bin/rm \{\} \; # find all core files and remove

find ~ -type f -exec chmod 0444 \{\} \; # make all plain files public

find ~ -type d -exec chmod 0755 \{\} \; # make all directories public

find ~ \( -name a.out -o -name '*.o' \) -atime +14 -exec /bin/rm \{\} \;

# get rid of all files a.out or

# ending in .o which haven't been

# accessed in 14 days

find ~ -name a.out -atime +7 -print # print all a.out's unused in last week

find ~ -size 500000c -print # print names of files that are bigger than 500,000 characters


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

200409   200412   200501   200502   200503   200504   200505   200506   200507   200508   200509   200510   200511   200512   200601   200602   200603   200604   200605   200606   200607   200608   200609   200610   200611   200612   200701   200702   200703   200704   200705   200707   200708   200709   200710   200711   200712   200801   200802   200803   200804   200805   200806   200807   200808   200809   200810   200811   200812   200901   200902   200903   200904   200905   200906   200907   200908   200909   200912   201001   201002   201003   201004   201007   201009   201011   201102  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]