Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Script advice

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 09-21-2012
Lem Lem is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 16 March 2015, 6:50 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 Unix and Linux 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 08:38 AM.