Unix Code

Man To find out more about a command use ‘man’ and then the command name, entering this will give you a program manual for that particular command. E.g. $ man vim Once displayed to see the next page, press the

The whereis command allows you to search for the location of programs that are not contained within any of the directories listed in the $PATH variable. $ whereis ifconfig ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz

Invoking a program by using it’s Path You can execute programs by typing out the full path name and the program name at the terminal prompt: $ /bin/ls Or you can just type the program name: $ ls As long

/bin /usr/bin Contains programs available to all users /sbin /usr/sbin Contains programs meant to be used by system administrators /var/log Contains the log files made by various applications. /home Contains all the personal directories of the users of the system

Devices on the system Every device on the Linux system is represented by a file in the /dev directory /dev/fd0 The first floppy drive in the computer /dev/hda The first master IDE Hard Disk Drive /dev/dsp The first audio DSP

There are two different programs that enable us to search the Linux file system. Locate This program works by building a daily database of files and their respective locations. When a search is performed, it looks in the DB for

The CPU information detected by the OS can be found by displaying the contents of the file /proc/cpuinfo $ cat /proc/cpuinfo The bogomips value given at the bottom of the file is a rough calculation of the CPUs speed, made

Command Description exports Lists the file systems to be exported by NFS ftpaccess Configuration file for ftpd group Lists the various groups on the system and each of their members hosts Lists the hostname and IP addresses of machines host.conf