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.

Closed

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.

Skills: Shell Script

See more: moving for a job, look for job, e value, create shell script, example shell script, yy, shell script, s parameters, MM, set within, delete file shell script, move files folder based file name, time scheduler, move file folder based file name, retention script, transfer time file, shell days move, transfer date, delete files folder, file transfer time, inside indicator, move files archive, directory script need, scheduler example, move files based file name

Project ID: #5408472

8 freelancers are bidding on average $5/hour for this job

Baxter2008

Hello I am a PHP developer with a solid background in Bash scripting. I can set this archive & purge script up for you. My estimate of 3 hours is a worst-case scenario; I anticipate to have it completed sooner. More

$5 USD / hour
(21 Reviews)
3.5
gajan1985

Hello, I can finish this work in one week. I have to work for approx 6-7 hours to complete this. Assuming that the OS is Linux, here is what my script will do. archive.sh -d <dir_path> -a <Y/N> -t <time_in_days More

$6 USD / hour
(1 Review)
1.4
krsumeet

Very experienced in Shell Scripting and want to improve my freelancer profile. That's why am bidding on this simple task. See my website to judge my capabilities for yourself: http://krsumeet.com Contact me if yo More

$4 USD / hour
(0 Reviews)
0.0
siddharthgupta90

I would like to complete this project as I have good experience in Scripting. Please allow me to do this project.

$3 USD / hour
(0 Reviews)
0.0
vgiacome

I believe this is a repost of another project. I will repeat my proposal here as well: I have a lot of experience with bash scripting, especially regarding daily file management. I worked a lot on incremental backup More

$5 USD / hour
(0 Reviews)
0.0
arpithajain85

- I have close to 7 years of Software Industry experience in reputes MNCs - I have performed multiple roles which includes Software development, Testing and Support - Along with coding, I strongly believe and practi More

$4 USD / hour
(0 Reviews)
0.0
campiandrea

Hi, I'm a linux system administrator from many years. I can create a bash script to resolve this problem. For me it 's very important to maintain a good reputation, I'll work' until you are satisfied. I can st More

$5 USD / hour
(0 Reviews)
0.0
karimbuzdar

Hi, I am interested to work for you. I have a linux experience and shell scripting. Terms are negotiable. I am online 16 hours a day. BR,

$5 USD / hour
(0 Reviews)
0.0