• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

C

nm : Command to list the symbols in object files.

by admin

nm displays the name list (symbol table of nlist structures) of each object file in the argument list. If you want to peep into an object file and see what are the various symbols that are defines in it the command will come handy. It takes an object file as input and lists out all […]

Filed Under: C, Linux

make: Nothing to be done for `default’

by admin

Most programs build with a simple, two-command sequence: $ ./configure $ make The configure program is a shell script that is supplied with the source tree. Its job is to analyze the build environment. configure command creates several new files in our source directory. The most important one is Makefile. Makefile is a configuration file […]

Filed Under: C, Linux

printk and console log level

by admin

printk() is to the kernel what printf() is to the userspace. Lines written by printk() can be displayed through the dmesg command. Depending on how important the message you need to print is, you can choose between eight log-level messages, defined in include/linux/kern_levels.h, along with their meaning. The syntax of printk is: printk (“log level” […]

Filed Under: C, Linux

How to use execl (example included)

by admin

execl is one of the families of exec calls that act as a front end to the execve. The following screenshot refers to man execl: The arguments for these seven exec functions are difficult to remember. The letters in the function names help somewhat. The letter p means that the function takes a filename argument […]

Filed Under: C, Linux

Introduction to Array in C Programming

by admin

An array is a collection of similar data elements. These data elements have the same data type. The elements of the array are stored in consecutive memory locations and are referenced by an index (also known as the subscript). If one subscript, then we call a one-dimensional array. Memory representation in an array The array […]

Filed Under: C

C Programming Basics – Interview Questions

by admin

1. What is Token? A token is a building block of a program. A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol. 2. What is Keyword? Keywords are special reserved words associated with some meaning. 3. What is keyword auto […]

Filed Under: C, Interview Questions

Basics of C programming

by admin

Structure of C Program A C program is divided into different sections. There are six main sections to a basic c program. The six sections are: Documentation Link Definition Global Declarations Main functions Sub programs The whole code follows this outline. Each code has a similar outline. Now let us learn about each of these […]

Filed Under: C, C Library

Serial Port Programming: tcflush – TCIFLUSH,TCOFLUSH example

by admin

termios The termios module provides a POSIX-style interface for controlling the behavior of TTYs and other serial communication devices on UNIX systems. All the functions operate on integer file descriptors such as those returned by the os.open() function or the fileno() method of a file object. In addition, the module relies on a large collection […]

Filed Under: C, C Library

Linux Device Driver example for dump_stack() to print the stack trace of module loading

by admin

One of the useful options in debugging is to print the call trace/stack trace. Linux kernel provides a function to print the stack trace: dump_stack(). The dump_stack function produces a stack trace much like panic and oops, but causes no problems and we return to the normal control flow. Calling dump_stack() function will print the […]

Filed Under: C, C Library

oe-pkgdata-util utility in Yocto

by admin

oe-pkgdata-util is helpful in determining why a file is included in the root file system. For example, on the development machine: $ oe-pkgdata-util find-path /etc/inittab sysvinit-inittab: /etc/inittab $ oe-pkgdata-util find-path */libncurses.so* ncurses-libncurses: /lib64/libncurses.so.5 ncurses-libncurses: /lib64/libncurses.so.5.9 ncurses-dbg: /lib64/.debug/libncurses.so.5.9 lib32-ncurses-dbg: /lib/.debug/libncurses.so.5.9 ncurses-dev: /usr/lib64/libncurses.so lib32-ncurses-dev: /usr/lib/libncurses.so lib32-ncurses-libncurses: /lib/libncurses.so.5.9 lib32-ncurses-libncurses: /lib/libncurses.so.5 The other way is given a recipe and […]

Filed Under: C, C Library

Next Page »

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright