Difference between revisions of "Linux command: xargs"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) (Created page with "Examples: <source lang='bash'> ls | xargs rm -rf # Delete all elements inside current directory ls | xargs -t rm -r # -t shows the command that will be executed ls | xargs...") |
Rafahsolis (talk | contribs) |
||
| Line 6: | Line 6: | ||
</source> | </source> | ||
| − | + | Other arguments<br /> | |
-P Specify max number of parallel processes<br /> | -P Specify max number of parallel processes<br /> | ||
-I Specify argument possition ej: ls | xargs -I ARG echo before ARG after | -I Specify argument possition ej: ls | xargs -I ARG echo before ARG after | ||
Revision as of 15:31, 28 December 2015
Examples:
ls | xargs rm -rf # Delete all elements inside current directory
ls | xargs -t rm -r # -t shows the command that will be executed
ls | xargs -t -n1 rm -r # Limit to one the number of arguments passed to rm
Other arguments
-P Specify max number of parallel processes
-I Specify argument possition ej: ls | xargs -I ARG echo before ARG after