Changes
Jump to navigation
Jump to search
← Older edit
Linux command: xargs
(edit)
Revision as of 08:36, 31 May 2018
245 bytes added
,
08:36, 31 May 2018
no edit summary
Line 4:
Line 4:
ls | xargs -t rm -r # -t shows the command that will be executed
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
ls | xargs -t -n1 rm -r # Limit to one the number of arguments passed to rm
+
echo "pdgrt-api-central pdgrt-api-node pdgrt-deployment rt-central rt-node" | xargs -n1 | xargs -I ARG git clone git@git.rra.lan:PDGRT_2.0/ARG.git
</source>
</source>
−
Other arguments<br />
+
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
+
+
+
<source lang='bash'>
+
mkdir directory_{000..999}
+
ls
+
ls | xargs -t -n10 rm -rf
+
</source>
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version