Understanding Executable Files


So far in your exploration of Linux, you've seen several basic text files and several directories or folders. Now we're going to expand our horizons to include other types of Linux files. For example, the /bin directory in the standard Linux file system contains another type of file, called an executable file. Executable files can be programs, commands, or scriptstools and applications that you tell the computer to run, often from the command line, to get things done.

You can use the ls command to view the contents of the /bin directory:

 [you@workstation20 ~]$ ls /bin arch        dnsdomainname    gzip      more           rview       traceroute6 awk         doexec           hostname  mount          sed         true [...] df          gtar             mknod     rpm            tracepath6 dmesg       gunzip           mktemp    rvi [you@workstation20 ~]$ 

The files in this directory are coded in several colors, including blue and a light blue known as cyan. Files listed in blue are executable files. (You learn more about the cyan files, called symbolic links, in the next section of this chapter.)

Your Files Have Been Alphabetized for You

You might not have noticed when working in directories with fewer contents, but the ls command typically displays the contents of any directory in vertically arranged alphabetical order. This ordering is evident in the /bin directory.


If you look carefully, you might notice that this particular directory, /bin, contains many of the commands you've been using. The commands cp, ls, mkdir, mv, pwd, rm, rmdir, and touch are all stored in the /bin directory. They are all actually Linux programs that are themselves started by the shell every time you enter them as commands. Linux uses these commands to accomplish the work you've been requesting of the system.

Every program, application, tool, or command that you use in Linux exists as an executable program file stored somewhere in the Linux file system. Every time you use such a program or call such a command, Linux loads the executable file, which contains instructions and program code, and runs it.



    SAMS Teach Yourself Red Hat(r) Fedora(tm) 4 Linux(r) All in One
    Cisco ASA and PIX Firewall Handbook
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 311
    Authors: David Hucaby

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net