≡ Menu

Linux

How to Debug C Program using gdb in 6 Simple Steps

Earlier we discussed the basics of how to write and compile a C program with C Hello World Program. In this article, let us discuss how to debug a c program using gdb debugger in 6 simple steps. Write a sample C program with errors for debugging purpose To learn C program debugging, let us [...]

{ 72 comments }

How to Find and Delete Empty Directories and Files in Unix

Question: How do I locate empty directories that doesn’t contain any files? Also, how do I find all empty files ( zero byte files ) in Linux? Answer: You can use unix find command to get a list of all empty files and directories as explained below. Also, refer to our earlier articles about unix [...]

{ 14 comments }

AWK Arrays Explained with 5 Practical Examples

Awk programming language supports arrays. As part of our on-going awk examples series, we have seen awk user defined variables and awk built-in variables. Arrays are an extension of variables. Arrays are variable that hold more than one value. Similar to variables, arrays also has names. In some programming languages, arrays has to be declared, [...]

{ 15 comments }

Ubuntu espeak is a speech synthesizer for English (and several other languages) which will convert text to speech. You can straight away execute espeak command on your Ubuntu machine without any installation or configuration. In this article, let us review 8 examples of espeak command. espeak Example 1: Speak the words specified in command line [...]

{ 12 comments }

Similar to our on-going Unix Sed and Unix Awk series, we will be posting several articles on Bash scripting, which will cover all the bash scripting techniques with practical examples. Shell is a program, which interprets user commands. The commands are either directly entered by the user or read from a file called the shell [...]

{ 12 comments }

Question: I would like to understand the basics of how to write and execute Cobol program on Linux OS. Can you explain it with a simple example? Answer: In this article, let us review very quickly how to write a basic Hello World Cobol program and execute cobol program on Linux or Unix OS. 1. [...]

{ 28 comments }

This article is part of the on-going Awk Tutorial Examples series. In our earlier awk articles, we discussed about awk print, awk user-defined variables, awk built-in variables, awk operators, and awk conditional statements. In this article, let us review about awk loop statements – while, do while, for loops, break, continue, and exit statements along [...]

{ 6 comments }

Get Source Code for any Linux Command

Question: How do I get source code of any Linux command? Answer: For Debian family Linux distributions, you can get source code for any Linux commands using one of the two methods mentioned below. Method 1: Get Source Code Using apt-get Step 1: Add a Source URI to sources.lst $ cat /etc/apt/sources.list deb-src http://ftp.de.debian.org/debian lenny [...]

{ 10 comments }