Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, what does the xargs command do?
Answer

It takes strings from stdin (mostly via pipe, where another commands output is xargs' stdin), and it seperates the strings by whitespace (mostly linebreaks), and then gives those strings, one by one as command line arguments to another command (for example to find, rm, touch, etc).


e.g. find . -name '*.py' | xargs touch
^^ above will change the update timestamp of all python files in all subdirectories below current one, to current timestamp


Question
In linux, what does the xargs command do?
Answer
?

Question
In linux, what does the xargs command do?
Answer

It takes strings from stdin (mostly via pipe, where another commands output is xargs' stdin), and it seperates the strings by whitespace (mostly linebreaks), and then gives those strings, one by one as command line arguments to another command (for example to find, rm, touch, etc).


e.g. find . -name '*.py' | xargs touch
^^ above will change the update timestamp of all python files in all subdirectories below current one, to current timestamp

If you want to change selection, open document below and click on "Move attachment"

20. Advanced Shell Scripting
$DIG_PID ) 2>/dev/null | grep -q '^[^;]*netscape.com' && break done 20.7.5 Recursive grep (search) Recursively searching through a directory tree can be done easily with the find and <span>xargs commands. You should consult both these man pages. The following command pipe searches through the kernel source for anything about the ``pcnet'' Ethernet card, printing also the line n

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.