Script advice | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Script advice

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-21-2012
davidra davidra is offline
Registered User
 
Join Date: Nov 2007
Last Activity: 26 November 2012, 9:53 AM EST
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Script advice

All

I have 2 parent directories - input and output. Each parent has multiple sub-directories...each sub-directory has multiple files. Each parent directory structure is a mirror image of itself

I need to poll the imput directory and if a new file is found, encrypt the file, move the file to its mirror image (output directory) and then delete itself from the input directory

I apprciate I can use cron to poll the directories and use find to list the files but what would be an elagant solution to this request.

This is what I think I can do so-far .....

<at parent directory>find . -type f -mtime -l -exec <encript file> | -exec mv
... but how do I mv the file to its mirror image directory location ?


Any advise / solution would be great

Thanks in advance
Sponsored Links
    #2  
Old 09-21-2012
Lem Lem is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 13 June 2014, 10:20 AM EDT
Location: Lombardia, Italy
Posts: 182
Thanks: 5
Thanked 38 Times in 38 Posts
Are you on Linux?
See incron, based on inotify.
--
Bye
Sponsored Links
    #3  
Old 09-24-2012
davidra davidra is offline
Registered User
 
Join Date: Nov 2007
Last Activity: 26 November 2012, 9:53 AM EST
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
OS is solaris 5.10
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Advice on script satimis Shell Programming and Scripting 0 04-10-2010 11:56 PM
Script Help/Advice earnstaf Shell Programming and Scripting 14 10-11-2007 05:53 PM
Script Advice please? earnstaf Shell Programming and Scripting 12 06-18-2007 04:55 PM
Advice on Script greengrass Shell Programming and Scripting 4 02-10-2007 11:49 PM
first script. need help and advice. sanchopansa Shell Programming and Scripting 17 10-07-2006 07:25 AM



All times are GMT -4. The time now is 01:43 PM.