Datasheet

21
Working with the Shell
grep [option(s)] searchstring filenames
The grep command finds a specific search string in the specified file(s).
If the search string is found, the command displays the line in which the
searchstring was found along with the file name.
-i Ignores case
-H Only displays the names of the respective files, but not the text lines
-n Additionally displays the numbers of the lines in which it found a hit
-l Only lists the files in which searchstring does not occur
diff [option(s)] file1 file2 The diff command compares the contents
of any two files. The output produced by the program lists all lines that do
not match. This is frequently used by programmers who need only send
their program alterations and not the entire source code.
-q Only reports whether the two files differ
File Systems
mount [option(s)] [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 file system.
-r mount read-only
-t filesystem Specifies the file system. The most common are ext2 for
Linux hard disks, msdos for MS-DOS media, vfat for the Windows
file system, and iso9660 for CDs.
For hard disks not defined in the file /etc/fstab, the device type must
also be specified. In this case, only root can mount it. If the file system
should also be mounted by other users, enter the option user in the ap-
propriate line in the /etc/fstab file (separated by commas) and save this
change. Further information is available in mount (1).
umount [option(s)] mountpoint This command unmounts a mounted
drive from the file system. To prevent data loss, run this command before
taking a removable data medium from its drive. Normally, only root is al-
lowed to run the commands mount and umount. To enable other users to
run these commands, edit the /etc/fstab file to specify the option user
for the respective drive.
275SUSE LINUX