Reply
Thread Tools
Posts: 303 | Thanked: 175 times | Joined on Oct 2009 @ London UK
#11
Lucky you

$ find / /home -xdev | grep " " | wc -l
436

It's always good to have space robust/aware shell code, though

IFS="" read file works pretty well, though a line starting with a space might be confused...
 

The Following 3 Users Say Thank You to cpitchford For This Useful Post:
ME2g's Avatar
Posts: 168 | Thanked: 58 times | Joined on Aug 2010 @ Vienna
#12
Originally Posted by ME2g View Post
Thanks.

Does "findutils-gnu v4.4.2-1maemo7"
http://maemo.org/downloads/product/M...findutils-gnu/
also do the trick?
Ok, gfind works as expected.
Thanks folks!
 
vkv.raju's Avatar
Posts: 402 | Thanked: 451 times | Joined on Dec 2007 @ India
#13
find . | xargs grep "search string"

If your search string is continuous (ex: abc1xyz2), no need to give quotes there. Else (ex: "abc1 xyz2"), quotes would be required.

"." represents the current folder and levels/directories under this directory/folder.

I find this very easy and fast to type too...
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#14
Originally Posted by vkv.raju View Post
find . | xargs grep "search string"

If your search string is continuous (ex: abc1xyz2), no need to give quotes there.
Yeah, but if your filenames contain spaces this will break.
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:16.