less [options] files
This command can be used to browse the contents of the specied le. Scroll half
a screen page up or down with [PgUp] and [PgDn] or a full screen page down with
[Space]. Jump to the beginning or end of a le using [Home] and [End]. Press [Q]
to exit the program.
grep [options] searchstring files
The grep command nds a specic search string in the specied les. If the search
string is found, the command displays the line in which searchstring was found
along with the lename.
-i
Ignores case
-H
Only displays the names of the relevant les, but not the text lines
-n
Additionally displays the numbers of the lines in which it found a hit
-l
Only lists the les in which searchstring does not occur
diff [options] file1 file2
The diff command compares the contents of any two les. The output produced
by the program lists all lines that do not match. This is frequently used by pro-
grammers who need only to send their program alterations and not the entire
source code.
-q
Only reports whether the two les dier
-u
Produces a “unied” di, which makes the output more readable
17.12.1.3 File Systems
mount [options] [device] mountpoint
This command can be used to mount any data media, such as hard disks, CD-
ROM drives, and other drives, to a directory of the Linux le system.
-r
Mount read-only
-t filesystem
Specify the le system, commonly ext2 for Linux hard disks, msdos for MS-DOS
media, vfat for the Windows le system, and iso9660 for CDs
For hard disks not dened in the le /etc/fstab, the device type must also be
specied. In this case, only root can mount it. If the le system needs to also be
Shell Basics 219