logoalt Hacker News

akdev1lyesterday at 6:33 PM1 replyview on HN

note that one should use -print0 and -0 for safety


Replies

adolphyesterday at 7:47 PM

Thanks! I've been using the -F{} do-something-tofile "{}" approach which is also handy for times in which the input is one pram among others. -0 is much faster.

Edit: Looks like when doing file-by-file -F{} is still needed:

  # find tmp -type f | xargs -0 ls
  ls: cannot access 'tmp/b file.md'$'\n''tmp/a file.md'$'\n''tmp/c file.md'$'\n': No such file or directory
show 2 replies