Portál AbcLinuxu, 8. května 2025 18:30
PING google.com (62.168.125.49) 56(84) bytes of data. 13.12.2015 18:42:10 64 bytes from 62.168.125.49: icmp_seq=1 ttl=59 time=31.5 ms 13.12.2015 18:42:11 64 bytes from 62.168.125.49: icmp_seq=2 ttl=59 time=31.6 ms 13.12.2015 18:42:12 64 bytes from 62.168.125.49: icmp_seq=3 ttl=59 time=31.6 msNa ping pouzivam tento prikaz, ktory samozrejme caz nezaznamena
ping -c 3 google.com ~/ping
PING google.com (62.168.125.49) 56(84) bytes of data. 64 bytes from 62.168.125.49: icmp_seq=1 ttl=59 time=31.5 ms 64 bytes from 62.168.125.49: icmp_seq=2 ttl=59 time=31.6 ms 64 bytes from 62.168.125.49: icmp_seq=3 ttl=59 time=31.6 msthx
date; ping -c 1
ping -D -n -c 3 google.cz PING google.com (173.194.122.14) 56(84) bytes of data. [1450029642.255402] 64 bytes from 173.194.122.14: icmp_seq=1 ttl=57 time=7.96 ms [1450029643.259331] 64 bytes from 173.194.122.14: icmp_seq=2 ttl=57 time=10.6 msTimestamp muzes prevest napriklad takto:
date --date='@1450029642.255402' Sun Dec 13 19:00:42 CET 2015
ping -D -c 5 google.com | while read row; do awk '{ sub(/[0-9]{10}/, strftime("%Y-%m-%d %H:%M:%S", substr($0,2,10))) }1' <<< "$row" ; done > ~/ping
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.