Anatomy of a simple Linux utility

Summary

In this article, I first looked at how Bash finds the location of the binary corresponding to the ls command; then, I showed how the kernel knows how to execute the binary using the appropriate binary handler. Finally, I dived deeper to see how the directory listing is retrieved from the underlying filesystem.

The Author

Amit Saha is a Software Engineer at Red Hat in Brisbane, Australia. He is working on his second book, Doing Math with Python and writes on various Linux and programming topics. He blogs at http://echorand.me.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Tracing Tools

    Programs rarely reveal what they are doing in the background, but a few clever tools, of interest to both programmers and administrators, monitor this activity and log system functions.

  • Fedora 13 is Live

    The latest release features improved device access, improved virtualization.

  • Bash Tuning

    In the old days, shells were capable of little more than calling external programs and executing basic, internal commands. With all the bells and whistles in the latest versions of Bash, however, you hardly need the support of external tools.

  • USENIX LISA: Ted T'so Helps with System Crashes and Presents SystemTap

    Linux kernel developer Ted T'so shared his know-how in a number of tutorials at the USENIX LISA conference in San Diego. One theme was getting first help for system crashes, and in the process, he took the opportunity to present SystemTap.

  • Binary Data in Bash

    Bash is known for admin utilities and text manipulation tools, but the venerable command shell included with most Linux systems also has some powerful commands for manipulating binary data.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News