Need a Shell Script for moving the files whose create time is within 7 days into a folder with same create date's name (i.e. mm-dd-yy) format. - repost
This project received 16 bids from talented freelancers with an average bid price of $11 USD / hour.Get free quotes for a project like this
Project Budget$2 - $8 USD / hour
o The main processing script will execute based on the input parameters defined of the job scheduler.
o The input_directory in the parameters is the target directory. The script will look inside the directory for any files.
o Based on the archive_indicator parameter and the create date time of the file , the script will create sub directories inside the target directory(if not created already)and move(transfer) the corresponding files from the target directory to the sub directory created.
o For Example: if the archive indicator has been set to Y, the script will look inside the target directory for any existing files. If the file has a create date time of “01-05-2014 04:25:00”, it will first look for a folder with the date “01-05-2014”. If such a folder exists, it will only transfer the file to the folder. If the said folder does not exist then it will create a folder with the above mentioned name and move the file from the target folder to the sub folder created.
o After the above process has been completed for all the files in the target folder, the script will look for the parameter(retention_period_days). The script will delete/purge all the sub directories and files inside the target directory which are dated before the retention period mentioned in the parameter.
o For example: considering the current date time as “01-05-2014 03:45:00” and the parameter value mentioned as 7, the script will delete all the sub directories named as and before “12-29-2013” and files with create date time before “12-29-2013 03:45:00” within the target directory.
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online