Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: Bash

Use grep—a search tool—in a Bash script on a CentOS VPS—script:
#!/bin/bash\ngrep \"GET\" /var/log/httpd/access_log | wc -l > hits.log
On Hetzner run:
./hits.sh
—expect request count Tracks hosting activity

Back to All Tips