xargs

build and execute command lines from standard input

copy
33
0
xargs -I '{}' mv dir1/'{}' dir2/'{}'

6 years, 9 months ago john2 0 | details |

copy
5
0
find /tmp -name core -type f -print | xargs /bin/rm -f

source | details |

copy
10
0
echo 1 2 3 4 | xargs echo

6 years, 9 months ago john2 0 | details |

copy
9
0
find . -name "*.foo" -print0 | xargs -0 grep barfind files matching *.foo and grep the contents to find bar

6 years, 9 months ago john2 0 | details |

copy
3
0
xargs sh -c 'emacs "$@" < /dev/tty' emacs

source | details |

copy
5
0
find /etc -name "*.conf" | xargs ls –llist all the conf files with -l

6 years, 9 months ago john2 0 | details |

copy
4
0
find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f

source | details |

copy
4
0
find . -maxdepth 1 -type d -print | xargs echo Directories:List all directories in current directory

6 years, 9 months ago john2 0 | details |

copy
4
0
find /path -type f -print0 | xargs -0 rmpipe the output of find into xargs and remove the file with rm

6 years, 9 months ago john2 0 | details |

copy
4
0
cat urls.txt | xargs wget –cDownload all the urls in urls.txt

6 years, 9 months ago john2 0 | details |

copy
11
0
cut -d: -f1 < /etc/passwd | sort | xargs echo

source | details |

copy
3
0
somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}'

source | details |