Skip to content

Instantly share code, notes, and snippets.

@rnewson
Created December 5, 2012 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnewson/4215207 to your computer and use it in GitHub Desktop.
Save rnewson/4215207 to your computer and use it in GitHub Desktop.
copytruncate
Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might continue writing
(appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have no effect, as the old log
file stays in place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment