Skip to content

Instantly share code, notes, and snippets.

@lavoiesl
Created October 5, 2012 19:36
Show Gist options
  • Save lavoiesl/3841879 to your computer and use it in GitHub Desktop.
Save lavoiesl/3841879 to your computer and use it in GitHub Desktop.
Clear Nginx cache, compatible with setuid
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid( 0 );
system( "find /var/nginx/cache -type f -delete" );
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment