troubleshooting Question

UNIX command question, what is xargs doing ?

Avatar of Alaska Cowboy
Alaska CowboyFlag for United States of America asked on
Unix OS
12 Comments3 Solutions710 ViewsLast Modified:
trying to figure out what this is doing . . .

ls | xargs file | grep -v "directory" | cut -d: -f1 | xargs -i mv -f {} oldfiles

I can tell it copies everything, but don't understand "xargs"

I know "ls", "grep -v", "mv"

"oldfiles" is a directory.

i'd like to move everything EXCEPT
- *.dat
- trigger_file_name.txt
Join our community to see this answer!
Unlock 3 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros