Quantcast
Channel: Find and move with exclude - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 5

Answer by YoMismo for Find and move with exclude

$
0
0

And the problem is that you don't want to display the error message or that you don't want the command being run if there are no .xml?

In the first case redirect output 2>/dev/null and no error message will be displayed.

In the second case run

for i in $(find ./*.xml '!' -type d | fgrep -v deposit.xml);do mv $i ./Archive;done


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>