file/directory names with space in between

Christopher Cowart ccowart at
Mon Apr 14 23:31:26 UTC 2008

Simon Gao wrote:
> I need to work on some files and directories that have spaces in them like:
> interesting story\2008 March\{story one,story two}.
> When using find with -exec, part of the file/directory name will be missing 
> and therefore lead to error.
> What should I do to put escape key in there to include full names?

$ echo foo > "test 1"
$ find . -type f -exec cat {} \;

Looks like it Just Works(tm), no quoting necessary. Could you provide
the actually command you're running that isn't doing what you expect?

Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list