Skip to content

Instantly share code, notes, and snippets.

@mapkyca
Created February 5, 2016 12:01
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 mapkyca/dc07d66772cdd5a3b6d0 to your computer and use it in GitHub Desktop.
Save mapkyca/dc07d66772cdd5a3b6d0 to your computer and use it in GitHub Desktop.
Get a list of unique downloads from an awstats download list
curl http://localhost/~marcus/awstats/domain/month/awstats.localhost.downloads.html | grep 'http://your.domain/you/are/interested/in' | sed -ne 's/.*\(http[^"]*\).*/\1/p' >> /tmp/files.csv
cat /tmp/files.csv | sort | uniq > /tmp/sorted.csv
@mapkyca
Copy link
Author

mapkyca commented Feb 5, 2016

To download these files:

xargs -n 1 curl -s -J -O < sorted.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment