Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Edit the path below for your installation
- WP_PATH=
- if [ -z $WP_PATH ]; then
- echo "WP_PATH not set, please edit the script to define WP_PATH"
- exit 0
- fi
- nobody_files=`grep -L body $WP_PATH/wp-content/cache/qc-c-*`
- num_files=$((`echo "$nobody_files" | wc -l` - 1))
- if [ $num_files == 0 ]
- then
- echo "No cached file without <body> tag could be found"
- else
- echo "Deleting $num_files cache files without <body> tag"
- rm $nobody_files
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement