From: Josh T. <he...@pu...> - 2007-05-17 13:56:36
|
On Thu, May 17, 2007 at 03:42:18AM -0400, Jeff Groves wrote: > The find your prescribe is going to find every .jpg and .avi file not only > in the current subdirectory, but also in all directories off of the one > specified in the command and move them to the new directory. Probably not > what you want to have happen if you've already moved yesterday's files > into their own subdirectory. > > All of this begs the question: Whats wrong with the simpleton's approach > (my favorite) of doing: > > mv *.avi $TEMP/ > mv *.jpg $TEMP/ > > What am I missing here that people are trying to kill themselves using > xargs? > > Thanks, > > Jeff G. Hi Jeff, I see what you're saying, but mv falls apart when dealing with anything but the simplest cases. That's why I prefer find/xargs for a lot of stuff. The current problem is a "simple case," but I generally try to set things up in anticipation of needing to do more complex things later. Thanks, Josh -- Josh Tolbert he...@pu... || http://www.puresimplicity.net/~hemi/ Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing. -- Helen Keller |