Link to home
Start Free TrialLog in
Avatar of Pradeep0308
Pradeep0308Flag for India

asked on

Archiving and Removal of old files AIX 7.1

Dear All,

I am looking for a script to add in crontab which can in a particular folder example /application/n1/logs check for a particular extension of files for example *.log and tar the files in an archive folder i.e. /application/archive/logs/originalfilename_YYYY.MM.DD.tar and delete files older than particular days for instance 30 from the folder /application/archive/logs/

Some of the parameters like extension of the file, input directory, archive directory and number of days should be controlled through a different input file where it can support multiple entries as well which could be changed according to different systems.

I would appreciate any help on this.

Thanks
Pradeep
Avatar of Pradeep0308
Pradeep0308
Flag of India image

ASKER

Hi,

The archival of file from original to archive directory should also be controlled by the number of days the file is older for example files older than 15 days should be archived.
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial