diff --git a/pages/linux/xargs.md b/pages/linux/xargs.md new file mode 100644 index 0000000000..5f3eb049ca --- /dev/null +++ b/pages/linux/xargs.md @@ -0,0 +1,15 @@ +# xargs + +> execute a command with piped arguments + +- main use + +`{{arguments}} | xargs {{command}}` + +- handling whitespace in arguments + +`{{arguments_null_terminated}} | xargs -0 {{command}}` + +- example: list unneeded packages with deborphan and remove them with apt-get + +`sudo deborphan | xargs sudo apt-get remove`