Run a shell command on files or directories with spaces
Sometimes "xargs" like funtionality is required but unfortunately (for whatever reason) some files have spaces in their paths.
"find" to the rescue:
find . -name "ALL*" -depth 1 -exec head "{}" \;
This command offers the same sort of functionality as
ls ALL* xargs head
but it works with files that have spaces in their names.
Written by Greg Roodt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#