Solved

Apple OS X Search Tools

Posted on 2014-04-30
5
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 29

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 40

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 40

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 29

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

705 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