Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Apple OS X Search Tools

Posted on 2014-04-30
5
Medium Priority
?
223 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 30

Accepted Solution

by:
serialband earned 1000 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 41

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 1000 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 41

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 30

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
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 …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 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