Miscellaneous programming tricks with C.

This is a very simple Hello World program in C. int main() { write(1, "Hello World\n", 14); }int main() { write(1, "Hello World\n", 14); } Counting how long a text string is. #include <stdio.h> #include <string.h> #define MSG "Hello Doctor, let’s get back to the TARDIS!" int main() { int…

Read More

Get real time hardware information on a Linux system with this utility.

This very useful Linux utility is a good way to get real-time Linux system information, and compare various activity on a system such as disk reads and writes, or network activity. ubuntu ~ $ dstat You did not select any stats, using -cdngy by default. —-total-cpu-usage—- -dsk/total- -net/total- —paging– —system–…

Read More

My sysinfo program updated with new code. Even better than before!

https://github.com/john302/sysinfo. This is the link to my newly updated sysinfo program. This has code added using the sysinfo struct. This means that the memory and uptime information that is output is actually readable now. This is what the output of the memory and uptime section looks like now. homer@deusvult:~/Documents/sysinfo.kdevelop-1.0$ ./sysinfo…

Read More