KandZ – Tuts

We like to help…!

Linux CLI 36 ๐Ÿง xargs and touch commands

a - xargs command 

xargs reads reads from standard input and execute a command
you can use it to perform operations in multiple files or directories
echo "hello world" | xargs echo @ โ†’ reads the string and and add it to echo
ls -d */ | xargs ls -lh @ โ†’ reads all directories and list them with long and human readable format
xargs -a aaa.txt โ†’ like cat command displays the contents of a file
common commands: -L โ†’ limits the input lines per command
-P โ†’ runs multiple commands in parallel -I โ†’ replaces `@` with each input line as an argument instead of whitespace


b - touch command

touch is used to create new empty files
it is also used to update the timestamp of a file
It can do the above for one or multiple files
touch my.txt โ†’ creates an empty file
if the my.txt exists then it updates its timestamp
touch my1.txt my2.txt โ†’ creates empty files
touch myfile{1..5}.txt โ†’ creates 5 files using wildcards

Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!

Leave a Reply