Solved

Apple OS X Search Tools

Posted on 2014-04-30
5
212 Views
Last Modified: 2014-05-01
Can someone please tell me a good tool for searching a Xserver for old files - Show files older than 2008.

Reason:   The Xserver is a file server for a design department.
There are 1.6 Tb of files saved on the server and it needs to be cleaned up.
I'd like to put all the files that are old into an Archive,  but the files are located all over the server in many many customer sub folders.

I'd like to do a sweep and move all the files onto an external drive but retaining the file structure.

Thanks in advance for any good suggestions.

mchallinor
0
Comment
Question by:Mchallinor
  • 2
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
serialband earned 250 total points
Comment Utility
Open Terminal.app from /Applications/Utilities/ or use spotlight, then you can use the unix find command to find the files and the unix tar command to archive them.

find <dir> -not -newermt 2008-01-01

Find them and list
find <dir> -not -newermt 2008-01-01 -ls

Find just the files.
find <dir> -not -newermt 2008-01-01 -type f

Archive the files using tar:
tar cvf ARCHIVE.tar `find <dir> -not -newermt 2008-01-01 -type f`
 add the gzip option for compressible data:
tar zcvf ARCHIVE.tgz `find <dir> -not -newermt 2008-01-01 -type f`
  or, alternatively use bzip for better compression:
tar jcvf ARCHIVE.tar.bz `find <dir> -not -newermt 2008-01-01 -type f`

Then
mv ARCHIVE.tgz /Volumes/BACKUP_DIR
mv ARCHIVE.tar.bz /Volumes/BACKUP_DIR

If you actually want them extracted,
tar cf - `find <dir> -not -newermt 2008-01-01` | (cd BACKUP_DIR; tar xf -)

When you are done and have properly verified your backup archive, you can delete them.
find <dir> -not -newermt 2008-01-01 -type f -exec rm '{}' \;
0
 
LVL 39

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 250 total points
Comment Utility
I'd second serialbands suggestions.

OSX Terminal commands are the most "reliable' way to go as spotlight indexing on network drives in not 100% reliable in my experience.

There's a lovely little FREE tool called EasyFind which is a visual version of the Terminal find command and it can also help you search for all files on the XServe by name or date or subfolder etc.  It will let you see WHAT files exist and how much space they use ... but you'll have to use the terminal commands in serialbands post above to do the archiving.
http://www.devontechnologies.com/products/freeware.html
0
 

Author Comment

by:Mchallinor
Comment Utility
I've used EasyFind a few times before and agree it is a great little application.
However, I'd like to search for file with a creation date < 01/01/2010 but I can seem to find any option to search all file with creation dates less than 2010.
0
 
LVL 39

Expert Comment

by:Eoin OSullivan
Comment Utility
Back to Terminal for that I'm afraid ... this command will output the list to a file on your desktop


find /Volumes/XSERVENAME -not -newermt 2008-01-01 -ls > ~/Desktop/list.txt
0
 
LVL 27

Expert Comment

by:serialband
Comment Utility
The terminal is the most complete tool you'll need for file search and text manipulation.  Unix was basically invented to do that.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The /etc/authorization file in Mac OS X 10.x can be used to control access to the various panes of the System Preferences amongst other things. It’s used by some of us Mac Sys Admin’s to give Standard Users access to System Prefs panes that only adm…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now