Fernando Mercês Posted August 10, 2017 at 01:13 AM Share Posted August 10, 2017 at 01:13 AM Às vezes num servidor Unix o comando watch não está disponível. Vi um administrador simulando-o assim: $ while :; do netstat -na; sleep 2; done Achei criativo. :-) Link to comment Share on other sites More sharing options...
Edson Fugió Posted September 9, 2017 at 03:21 AM Share Posted September 9, 2017 at 03:21 AM Um outro jeito seria utilizar o for no lugar do while: $ for((;;)); do netstat -na; sleep 2; done Link to comment Share on other sites More sharing options...
Fernando Mercês Posted September 9, 2017 at 02:12 PM Author Share Posted September 9, 2017 at 02:12 PM Ah sim. Mas hoje em dia tem watch na maioria dos servers né? É que eu lembro dum brother que fazia isso direto num Solaris (que não tinha watch). se hoje eu pegasse um servidor assim, instalaria as ferramentas ao invés de ficar me matando. rs Fiz isso no Mac por exemplo, aí tenho o conjunto GNU e aí é só usar gstrings, ggrep, etc. Abraço! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.