I have a file with the following structure:
1486113768 3656
1486113768 6280
1486113769 530912
1486113769 5629824
1486113770 5122176
1486113772 3565920
148611
Say you have a top ten lines from many log files output concatened in one file (and sorted with 'sort') with that kind of results :
2142 /pathtofile1/00.jpg
2173 /pathtofile1/00.jpg
2100 /pathtofile1/00.jpg
2127 /pathtofile1/00.jpg
you can also change the order of sum:
$ awk '{ seen[$2] += $1 } END { for (i in seen) print i, seen[i] }' top10s.txt | sort -k 2 -rn
and you'll get that total:
/pathtofile1/00.jpg 8542