[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mv files by date



On Thu, 31 Aug 2006 13:51:44 -0700, Curtis Vaughan wrote:

> find ./ -type f ! -mtime -2 -exec ls -al {} \; | xargs mv ../
> 
> in order to move the files found in the script up one directory?

Why use xargs? find -exec deals with file one at a time. 

Why not something like (please test before use):

find ./ -type f ! -mtime -2 -exec mv {} ../ \;





Reply to: