Today I learned about an interesting trick to pass along. I have surprisingly never run across this in my nearly 10 years of doing I.T. work, and while it won’t save a lot of time, it is certainly very interesting.
The ping command has the ability to omit zero blocks automatically when attempting to ping a device. An example of this would be “Ping 10.1”
C:\Users\GuestBlogger>ping 10.1Pinging 10.0.0.1 with 32 bytes of data:Reply from 10.0.0.1: bytes=32 time=2ms TTL=62Reply from 10.0.0.1: bytes=32 time=4ms TTL=62Reply from 10.0.0.1: bytes=32 time=2ms TTL=62Reply from 10.0.0.1: bytes=32 time=2ms TTL=62Ping statistics for 10.0.0.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 2ms, Maximum = 4ms, Average = 2ms
As you can see the command automatically adds in the required 0 blocks to properly complete the command. This works in different variants as well such as 10.1.0 (10.1.0.0) or 10.0 (10.0.0.0).
I can confirm that this little trick works on both Windows and Linux.