terminal.cab

All commands

xargs

Topic: Searching

Program: xargs

Turns its input into arguments for a command.

Package: find-xargs

Usage

xargs [OPTION]... [COMMAND [ARG]...]

Description

Read words from standard input and run COMMAND (echo if none is given) with ARGs followed by those words, as often as needed. Words are separated by spaces and newlines; quotes and a backslash keep them together.

Options in the simulator

13 more options of the real program, not in the simulator yet
  • -E needs a value not in the simulator yet

    Explanation to come

  • -e not in the simulator yet

    Explanation to come

  • --eof value optional not in the simulator yet

    Explanation to come

  • -i not in the simulator yet

    Explanation to come

  • --replace value optional not in the simulator yet

    Explanation to come

  • -l value optional not in the simulator yet

    Explanation to come

  • -o, --open-tty not in the simulator yet

    Explanation to come

  • -p, --interactive not in the simulator yet

    Explanation to come

  • --process-slot-var needs a value not in the simulator yet

    Explanation to come

  • -s, --max-chars needs a value not in the simulator yet

    Explanation to come

  • --show-limits not in the simulator yet

    Explanation to come

  • -x, --exit not in the simulator yet

    Explanation to come

  • --version not in the simulator yet

    Explanation to come

Examples

From the lesson Branching off and passing on
find cache -name "*.tmp" -print0 | xargs -0 -n 1 echo rm
rm cache/a.tmp
rm cache/b.tmp
rm cache/old report.tmp
find cache -name "*.tmp" -print0 | xargs -0 rm
ls cache
keep.log

Try it in the terminal

Where you learn it

Lessons

All commands