Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did 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
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...