Advertisement
mkv

bash eksempler

mkv
Jun 26th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1. # find all digicam pics on an hdd
  2. find /media/bismuth/ -type f | sort > a; cat a | sed -r 's_(.*)/(.*)_\2                                                          \1/\2_' | sed -r 's/(.{60}) */\1/' | grep -iE 'jpg$' | grep -E '^[^0-9\.]{3}' | uniq -Dw3 | less
  3.  
  4.  
  5.  
  6. # graph of free disk space over time on a server
  7. (echo 'set term pngcairo size 1280,720'; echo 'set xlabel "tens of seconds"'; echo 'set ylabel "free GB  (started out with 90GB, logging begun at 76GB)"'; echo "plot '-' with lines"; cat dused | while read x;do echo "scale=16;$x / (1024 * 1024)"; done | bc  |head -n 1500) | gnuplot > /var/www/diskfree.png
  8.  
  9.  
  10.  
  11. # access.log link popularity
  12. cat access.log | grep '00] "GET /' | sed -E 's-.*00] "GET (.*?) HTTP/[0-9.]*" .*-\1-' | sed -E 's-(.)/$-\1-' | sort | uniq -c | sort -n | grep -v '/th/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement