how can i make it overwrite duplicates?
Main Topics
Browse All Topicsi need a script that i can have cron run everyday to move our order files older than 30 days into another folder containing all the orders over 30 days.
i want to keep the amount of orders in our order folder down to about 3000 and we can do that by eliminating them by dates older that 30 days. anything above that and we start seeing big performance reductions.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
hey man, thanks for your help. i should have said this earlier. the folder im having look at is a folder with a bunch of other folders in it contaning order files, after 30 days it starts getting really big and slow so im trying to get a script that will move the folders with dates older than 30 over to another folder.
here is one line of the thousands returned by the script:
mv: rename /Volumes/Email Server_HD/OrderFiles/Tempo
can we have it only copy visible folders?
thanks,
brandon
I don't have '/Volumes/Email Server_HD/OrderFiles/Tempo
what do
ls -ld '/Volumes/Email Server_HD/OrderFiles/Tempo
and
ls -l '/Volumes/Email Server_HD/OrderFiles/Tempo
say?
Also, what is the exact command you are using?
Where does the '*Archives' come from?
In the shell, * would usually be wildcard to match any filename ending in 'Archive'
i just ran the script again and it looked in the folders and moved everything older than 30 days to the archive folder, now i have an archive folder with files instead of folders containing files. i need it to just look at the folder dates not the contents, then move the folder if its older than 30 days...
Business Accounts
Answer for Membership
by: ozoPosted on 2005-04-06 at 16:46:50ID: 13722560
find /path/to/orderfolder -mtime +30 -exec mv {} /path/to/otherfolder \;