Solved

Apple OS X Search Tools

Posted on 2014-04-30
5
213 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 28

Accepted Solution

by:
serialband earned 250 total points
ID: 40032563
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
ID: 40034119
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
ID: 40034135
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
ID: 40034144
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 28

Expert Comment

by:serialband
ID: 40034910
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Connectivity using SMB Symptoms When connecting to Windows Server shares from a Mac you receive an error similar to "Connection failed because the original item could not be found"Authentication persistently fails to a Windows Server from a Mac wi…
If you other experts are anything like me you are always looking into and testing out new features. While I was doing some research one day I ran across an app that I installed on my Mac and used as a security system. Mac OS X: SecureHome uses your …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

919 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

14 Experts available now in Live!

Get 1:1 Help Now