1752794 Members
5739 Online
108789 Solutions
New Discussion

Re: Scripting

 
CBZ
Occasional Advisor

Scripting

Hi All,

I would like to write a script which will do following task.

1.Search for all file(assume txt files) which is 20 days older.
2.Once we have the file with their location it will compress it in their respective location.

Please help me to prepare this script.

Thanks,
CBZ
1 REPLY 1
James R. Ferguson
Acclaimed Contributor

Re: Scripting

Hi:

# find /path -xdev -type f -mtime +20 -exec gzip {} \;

Substitute whatever you need for '/path'.

Regards!

...JRF...