Interesting ping trick, it ignores leading zeros in an IP address.

The IP address you supply the ping command with can have a leading zero or multiple leading zeros and they will be ignored by the ping command. This is an example. jason@jason-desktop:~$ ping 192.168.00001.00002 PING 192.168.00001.00002 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.012 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 … Read more

Strange bash piping method that actually does work. And fixing hard disk partitions with fsck.

This is a strange bash piping method that actually does work. This pipes the output of one echo command and appends it to another. ubuntu ~ $ echo "Hello World" >| echo "Me" > out.txtubuntu ~ $ echo "Hello World" >| echo "Me" > out.txt This is the result of this strange command. ubuntu ~ … Read more

OpenSUSE 12.3 distribution working very well on my new laptop.

The OpenSUSE 12.3 distribution is a Linux desktop solution that is working very well on my laptop. I decided to install it on that instead of on my desktop and everything is working a treat. I had problems getting this distribution working with ATI hardware, so I wanted it on my laptop. It had an … Read more

Very cool and interesting Linux commands.

How to search your home directory for certain files. The find command is very useful for searching your computer for various files. john@adeptus-mechanicus ~ $ find /home/$LOGNAME -name "*.avi" /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/The.Hobbit.2012.DVDSCR.XVID-NYDIC.avi /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/sample/sample.avijohn@adeptus-mechanicus ~ $ find /home/$LOGNAME -name "*.avi" /home/john/Azureus Downloads/[ www.Torrenting.com ] – The.Hobbit.2012.DVDSCR.XVID-NYDIC/The.Hobbit.2012.DVDSCR.XVID-NYDIC.avi /home/john/Azureus Downloads/[ … Read more

Another good grep trick to find strings that end in numbers but you are not sure which.

How do you search a binary file for a certain string that ends in a number; but you are not sure what the number is? Then this command will perform this task. john@adeptus-mechanicus ~/Documents/master $ strings vesperas.wad | grep -a "MAP[0-9]" MAP15john@adeptus-mechanicus ~/Documents/master $ strings vesperas.wad | grep -a "MAP[0-9]" MAP15 I was using this … Read more

Cool C programming trick, run /bin/sh with the C execve() function.

This programming trick is pretty cool, you can run the /bin/sh shell with a C program. The execve() function is useful for running a command within a C program and passing arguments to it, but I have replaced the arguments with NULL instead, that is what you put when you do not need arguments. #include … Read more