Showing results for 
Search instead for 
Do you mean 

Scripting

Highlighted
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
Acclaimed Contributor Acclaimed Contributor

Re: Scripting

Hi:

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

Substitute whatever you need for '/path'.

Regards!

...JRF...