Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
facilities:slq_wiki:logging [2019/12/12 09:58]
Andrei Maberley
facilities:slq_wiki:logging [2019/12/12 09:59] (current)
Andrei Maberley [Accessing Metadata]
Line 66: Line 66:
 To work out how many pages have been created, we need to go back to dokuwiki'​s metadata. ​ What we want is the metadata stored in  .changes file for each page and media file, that was created in our date range, and __not__ created by one of our team.  The changes file on an newly created page inside /data/meta/ looks like: To work out how many pages have been created, we need to go back to dokuwiki'​s metadata. ​ What we want is the metadata stored in  .changes file for each page and media file, that was created in our date range, and __not__ created by one of our team.  The changes file on an newly created page inside /data/meta/ looks like:
  
-   ​1487560052 192.168.6.90 C workshops xxxxx created 18942+   ​1487560052 192.168.6.90 C workshops user created 18942
        
-"​1487560052"​ is the timestamp in [[https://​en.wikipedia.org/​wiki/​Unix_time|unix time]] ​ the second is the IP address, "​C"​ means created, and "mick" is our users name. Thats all we need.+"​1487560052"​ is the timestamp in [[https://​en.wikipedia.org/​wiki/​Unix_time|unix time]] ​ the second is the IP address, "​C"​ means created, and "user" is our users name. Thats all we need.
  
 We only need the first line of each file called .changes. ​ We can do this with the head command. We only need the first line of each file called .changes. ​ We can do this with the head command.
Line 80: Line 80:
 Then we want to filter out our internal users with grep, and use the -c option to tally the output. Then we want to filter out our internal users with grep, and use the -c option to tally the output.
  
-  grep -v -c --line-buffered ​mick +  grep -v -c --line-buffered ​user 
  
 Finally lets turn on the globstar in our shell so we can use head recursively. ​ Finally lets turn on the globstar in our shell so we can use head recursively. ​
  • facilities/slq_wiki/logging.txt
  • Last modified: 2019/12/12 09:59
  • by Andrei Maberley