Lista todos
os camandos executados no Shell ( prompt )
# history
470 du
-sh/var/www/html/squid-reports/mes/14Jul2011-16Jul2011
471 du -sh /var/www/html/squid-reports/mes/14Jul2011-16Jul2011/
472 cat >
/var/ww/html/squid-reports/sarg_reports.html
473 cat >
/var/www/html/squid-reports/sarg_reports.html
476
nano /etc/crontab
Se precisarmos reutilizar o comando da linha 471. Digite exclamação e o
número do comando que esta no histórico.
# !471 ( enter )
du -sh
/var/www/html/squid-reports/mes/14Jul2011-16Jul2011/
Podemos filtrar comandos no history. Abaixo
filtraremos todas as linhas que tiverem no histórico o comando du
# history | grep du
52 wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
53 tar xvf noip-duc-linux.tar.gz
366
adduser squiduser
456 du
-sh /var/www/html/squid-reports/dia
462 du
-sh/var/www/html/squid-reports/semana -l
Os 10
comandos mais usado.
# history | awk '{a[$'$(echo "1 2
$HISTTIMEFORMAT" | wc -w)']++}END{for(i in a){print a[i] " "
i}}' | sort -rn | head
76 cd
76 cat
53 iptables
42 nano
12 kill
Apaga todos
os comandos no histórico ( clean – limpa )
# history –c
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
===[ Sharing Knowledge ]=== - Obrigado - Thank you - Danke - Merci - Grazie - Gracias - arigatou gozaimasu
“We make a living by what we get, but we make a life by what we give.” - Give and you will receive - just share :)
------------------------------------------------------------------------------------------------------------------------
“We make a living by what we get, but we make a life by what we give.” - Give and you will receive - just share :)
------------------------------------------------------------------------------------------------------------------------
Nenhum comentário:
Postar um comentário