The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-17-2006
Jukai Jukai is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 1
bash/awk scripting help (creating OLD new users)

I need some help making this script... I guess I'm having trouble even interpretating what to even get started on...

I need to create a script that will search a given directory (typically a user's home directory, but not necessarily) as provided on the command line and any sub-directors for temp files/directies matching the criteria (which is written below) and delete them.

The only criteria are
Temp file and temp directory names will begin with a comma (,).
Temp files and temp directories (including all of their contents) will be removed 5 days after the last modification date of the file or directory.
The home directory and all of its subdirectories, only users with user ids greater than or equal to 500 will be checked for temp files and directories.

Anyone mind showing a sample script, or point me in the right direction here? I'm stumped...