Top "Xargs" questions

xargs is a command on Unix and most Unix-like operating systems used to build and execute command lines from standard input.

How can I use xargs to copy files that have spaces and quotes in their names?

I'm trying to copy a bunch of files below a directory and a number of the files have spaces and …

linux macos unix command-line xargs
Make xargs execute the command once for each line of input

How can I make xargs execute the command exactly once for each line of input given? It's default behavior is …

xargs
Running multiple commands with xargs

cat a.txt | xargs -I % echo % In the example above, xargs takes echo % as the command argument. But in some …

bash xargs
Using grep to search for hex strings in a file

I have been trying all day to get this to work. Does anyone know how to get grep, or something …

bash awk grep xargs dd
Make xargs handle filenames that contain spaces

$ ls *mp3 | xargs mplayer Playing Lemon. File not found: 'Lemon' Playing Tree.mp3. File not found: 'Tree.mp3' Exiting... (…

shell find xargs
Running programs in parallel using xargs

I currently have the current script. #!/bin/bash # script.sh for i in {0..99}; do script-to-run.sh input/ output/ $i done …

bash parallel-processing xargs
xargs with multiple arguments

I have a source input, input.txt a.txt b.txt c.txt I want to feed these input into …

linux bash shell command-line-arguments xargs
Calling shell functions with xargs

I am trying to use xargs to call a more complex function in parallel. #!/bin/bash echo_var(){ echo $1 return 0 } …

bash sh xargs
How to use > in an xargs command?

I want to find a bash command that will let me grep every file in a directory and write the …

bash redirect xargs
Modifying replace string in xargs

When I am using xargs sometimes I do not need to explicitly use the replacing string: find . -name "*.txt" | xargs …

bash xargs