The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
change filenames to Proper case prvnrk Shell Programming and Scripting 7 09-26-2007 02:43 PM
Check for proper e mail id format prolay Shell Programming and Scripting 2 08-23-2007 04:37 AM
Proper routing BOFH IP Networking 3 03-04-2007 12:36 AM
Application servers, proper usage jonwillog UNIX for Dummies Questions & Answers 1 08-22-2005 09:19 PM
Proper Forum Etiquette tarballed Post Here to Contact Site Administrators and Moderators 8 09-10-2002 07:32 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2008
guriboy guriboy is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 2
Proper use of prune...

My goal was to find any directories inside of any directory called "09_Client Original" not modified in the last 30 days.
Code:
$ find /Volumes/Jobs_Volume/ -type d -name "09_Client Original" -exec find {} -mtime +30 -type d -maxdepth 1 \;
The results of this find are passed along in a perl script to this command, which is the Stuffit command line utility for MacOSX:
Code:
/usr/local/bin/stuff -f sit5 -m 2 -o -D /results/from/above
This works fine for me, but I have run into an issue. Sometimes there are huge directories [>50GB] inside of "09_Client Original" that make it impractical to run the stuff command on.

I'd like to rename these directories with a _phsht suffix and prune the results in my find command. I tried this:
Code:
find /Volumes/Jobs_Volume/ -type d -name "09_Client Original" -exec find {} -mtime +30 -type d -maxdepth 1 \( -type d -name "_phsht" -prune \) -o -print \;
The results of this command list files in the results. I'm stuck.

Thanks in advance!
  #2 (permalink)  
Old 03-13-2008
guriboy guriboy is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 2
After mucking around a bit, I figured it out.

Code:
$ find /Volumes/Jobs_Volume/1 -type d -name "09_Client Original" -exec find {} -name "*_phsht" -prune -o -mtime +30 -type d -maxdepth 1 -mindepth 1 -print \;
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0