How can I escape spaces and other symbols from the results of a find command? For example, this doesn't work if there are spaces and other symbols in the results:
find -maxdepth 5 -type d -print | xargs du -sk | sort -rn
You want to use find ... -print0 and xargs -0.
find ... -print0
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
3 years ago