DEV Community

Lavender
Lavender

Posted on

Find: Find and compress

Find all .java files and compress it into java.tar

$ find . -type f -name "\*.java" | xargs tar cvf java.tar
Enter fullscreen mode Exit fullscreen mode

Find all .csv files and compress it into quickref.zip

$ find . -type f -name "\*.csv" | xargs zip quickref.zip
Enter fullscreen mode Exit fullscreen mode

Useful links

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay