Skip to content

Instantly share code, notes, and snippets.

@rwos
Created April 3, 2013 10:43
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 rwos/5300154 to your computer and use it in GitHub Desktop.
Save rwos/5300154 to your computer and use it in GitHub Desktop.
plots a graph of the modification times of all the files in ~/src (year on x-axis, hour on y-axis)
#!/bin/bash
find ~/src -printf '%CY-%Cm-%Cd %CH %CM\n' | \
awk '{print $1" "$2"."($3/59)*100;}' | \
sed 's/\.[^.]\+$//' > times.dat
gnuplot plot.gp > plot.png
set xdata time
set timefmt "%Y-%m-%d"
set format x "%Y"
set xlabel 'year'
set ylabel 'hour'
set yrange [0:24]
set ytics 1
set xtics 365*24*60*60
set terminal png size 800,600
plot "times.dat" using 1:2 title 'mod time' with points
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment