xarg
Linux Commands - Managing Files and Text

xarg

This command will run a command multiple times to make sure the arguments are all executed.


Options

-n numberarguments limit number additional arguments


In the example the arguments are only run one time. This example is searching for each occurrence of the string vim from the root directory.



find / -type f | xargs -n 1 grep vim


# vim:ft=sh:

complete -f -X '*.@(o|so|so.!(conf)|a|tar?(.@(gz|bz2))|tgz|tbz2|rpm|zip|ZIP|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview

grep: /etc/apt/secring.gpg: Permission denied

grep: /etc/apt/trustdb.gpg: Permission denied

# vim:ts=4:sw=4:

# vim:set ai et sts=2 sw=2 tw=0:

# vim: syntax=sh

# vim: syntax=sh

# vim:syntax=sh

# vim:set ai et sts=2 sw=2 tw=80:

# vim:set ai et sts=2 sw=2 tw=80:

# vim:set ai et sts=2 sw=2 tw=80:

# vim:set ai et sts=2 sw=2 tw=80:

# vim:set ai et sts=2 sw=2 tw=80:

---cut---