↑ ↓ select, Enter open, Esc close

Find the most requested URLs in the access log

Adjust the values, the command updates live
root@server
awk '{print $7}' /var/www/vhosts/system/example.com/logs/access_ssl_log | sort | uniq -c | sort -rn | head -20

Prints the 20 most frequently requested paths with their count. Helpful with load problems to spot conspicuous targets such as xmlrpc.php, wp-login.php or a search URL. Query strings remain part of the URL, so the same page with different parameters is counted separately.

Note: To strip parameters, replace {print $7} with {split($7, u, "?"); print u[1]}.

Also searched as

  • which page gets the most hits
  • top urls access log
  • most requested pages apache
  • what is being requested so often

Related one-liners

All in Logs

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.