Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi All,
Can anyone please help with the following,
I'm trying to write a script(bash) that will:
1. constantly run in the background and monitor the size of a particular file.
2. When this file reaches a certain limit
it will copy the contents to a new file.3. It will then write the original file to /dev/null
As mentioned above, this will be a constant process and every time the original file reaches its limit the contents will be written to a fresh new file.
As you can probably tell, I am new to scripting and I kind of have an idea of how to implement some of the above steps - But I don't know how it all fits together.
Any assistance would be greatly appreciated.
Thank you

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |