The UNIX and Linux Forums  

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
Working with multiple home directories. trey85stang Shell Programming and Scripting 11 05-15-2008 11:45 PM
Batch delete specific folder from user home directories nipodrom Shell Programming and Scripting 2 05-09-2008 03:22 AM
Delete Directories and Contents t4st33@mac.com UNIX for Dummies Questions & Answers 1 01-16-2007 03:20 PM
How to backup /home directories? kingsan SUN Solaris 1 05-03-2006 02:41 PM
HACMP users home directories zz2kzq AIX 1 02-21-2006 11:22 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2006
Registered User
 

Join Date: Mar 2006
Posts: 5
Stumble this Post!
Delete old home directories

I have a script that deletes obselete users from /etc/passwd then moves their home directories to another location. After 30 days, I need to delete the home directories that were moved to the new location. I would appreciate any ideas on how to delete the directories after the 30 days?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-01-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,448
Stumble this Post!
How about:
sleep 2529000
rm -rf /archive/$ouser

Just kidding. Seriously, just have a second script that runs once a month which searches your archive directory and deletes old subdirectories.
Reply With Quote
  #3 (permalink)  
Old 03-01-2006
Registered User
 

Join Date: Mar 2006
Posts: 5
Stumble this Post!
Thanks Perderabo.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0