[Ilugc] .a-tip-a-day. xargs command

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Mon Sep 21 18:24:41 2009

On Sat, Sep 19, 2009 at 5:04 AM, Girish Venkatachalam
<girishvenkatachalam@xxxxxxxxx> wrote:

$ find /etc | xargs vi
...
$ find /etc -type f | xargs vi

This command will not work if you have filenames with spaces.

Recommended that you null terminate your strings like this to
handle such cases:

find /etc -type f -print0 | xargs -0 vi

- Raja

Other related posts: