sign in
|
add example
|
see also:
updatedb
,
execvp
,
find
xargs
build and execute command lines from standard input
[
package
|
man 1
|
usage
|
wiki
|
homepage
]
examples
configs
questions
links
[
new example
]
copy
33
0
xargs -I '{}' mv dir1/'{}' dir2/'{}'
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
11
0
cut -d: -f1 < /etc/passwd | sort | xargs echo
cut
sort
xargs
source
|
details
|
copy
10
0
echo 1 2 3 4 | xargs echo
echo
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
9
0
find . -name "*.foo" -print0 | xargs -0 grep bar
find files matching *.foo and grep the contents to find bar
find
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
5
0
find /tmp -name core -type f -print | xargs /bin/rm -f
find
xargs
source
|
details
|
copy
5
0
find /etc -name "*.conf" | xargs ls –l
list all the conf files with -l
find
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
4
0
find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f
find
xargs
source
|
details
|
copy
4
0
find . -maxdepth 1 -type d -print | xargs echo Directories:
List all directories in current directory
find
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
4
0
cat urls.txt | xargs wget –c
Download all the urls in urls.txt
cat
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
4
0
find /path -type f -print0 | xargs -0 rm
pipe the output of find into xargs and remove the file with rm
find
xargs
2 years, 4 months ago
john2
0 |
details
|
copy
3
0
xargs sh -c 'emacs "$@" < /dev/tty' emacs
xargs
source
|
details
|
copy
3
0
somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}'
xargs
source
|
details
|
[
new config
]
[
ask question
]
xargs The Single UNIX® Specification The Open Group