Xargs Command Snippets


Modified:   June 13, 2022
Published:   November 12, 2021

Tags:
Ref: https://web.archive.org/web/20211112045447/https://flaviocopes.com/linux-command-xargs/

Simple command snippet that most likely be used imo would be.

1
2
3
4
ls -f | xargs -I % -p echo "testxargs-%"
ls -f | xargs -I {} /bin/bash -c 'echo test1-{}; echo test2-{}'
ls -f | xargs -I % /bin/bash -c 'echo test1-%; echo test2-%'
ls -f | xargs -i -pt echo "testxargs-{}"

< Prev   Further Reading   Next >

For feedbacks via email: email@murarisumit.in