[ale] dreaded spaces in file names....

John Wells jb at devsea.com
Mon Jan 19 22:01:33 EST 2004


I have a large drive that I run Win4Lin on this drive, which means I have
a large number of windows files that have spaces in either the file name
or one of the containing directories.

I often have to search the drive and look for certain patterns in certain
files.  So, a typical search might look like this:

locate txt | grep '\.txt$' | xargs grep 'mypattern'

I use locate because the drive is too large for find.  I use grep to
narrow the resultset down a bit, and then pipe it to good ole xargs.

Works great....except for those bloody Windows files.

I'm aware of getting around this by using find -print0 and xargs -0, but
as I mentioned before, find is too slow on this big drive.

Anyone know a way to solve this problem without renaming the files?

Thanks for the help!

John



More information about the Ale mailing list