I have 30 or so directories in a /logs directory. I need to monthly compress all files for previous month in each subdirectory, create a new dir (ex. previouse month 2003-Jul) and then move them to that new subfolder.
Currently the file is:
/logs/dr1/filename.log
compress and move to:
/logs/dr1/2003/Jul)
I am new to unix and don't want this to be a manual process - want it to be in a script I can run at the start of the new month.
Any suggestions?
Currently the file is:
/logs/dr1/filename.log
compress and move to:
/logs/dr1/2003/Jul)
I am new to unix and don't want this to be a manual process - want it to be in a script I can run at the start of the new month.
Any suggestions?