Table of Contents

Introduction aux scripts BASH

Top ten unix shell commands

Sur narsil:

history |awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -nr |head -n 10
    136 sudo
     71 ls
     46 vi
     29 cd
     24 less
     16 dpkg
     16 df
     15 ldapadd
     11 man
     11 apt-cache

Sur mjollnir:

history |awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -nr |head -n 10
     96 sudo
     48 ssh
     33 ls
     30 ping
     21 mount
     20 less
     18 dmesg
     18 cd
     17 apt-cache
     16 lpq

Comment couper une session?

sudo pkill -KILL -u username

Uptime

uname -nvm > uptime.txt && date >> uptime.txt && uptime >> uptime.txt ; cat uptime.txt