
136
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-p prototype
Apply the same settings as used for the specified user or
group: prototype.
-r Edit quotas on remote systems.
-t Edit grace times for block and inode quotas.
-T Edit grace times for individual user or group name.
-u Edit user quotas. (This is the default.)
egrep
egrep [options] [regexp] [files]
Search one or more files for lines that match an extended regular
expression regexp. egrep doesn’t support the regular expressions \(,
\), \n, \<, \>, \{, or \}, but it does support the other expressions, as
well as the extended set +, ?, |, and ( ). Remember to enclose these
characters in quotes. Regular expressions are described in
Chapter 7. Exit status is 0 if any lines match, 1 if none match, and
2 for errors.
See grep for the list of available options. Also see fgrep.
Examples
Search for occurrences of Victor or Victoria in file:
egrep 'Victor(ia)*' file
egrep '(Victor|Victoria)' file
Find and print strings such as old.doc1 or new.doc2 in files, and
include their line numbers:
egrep -n '(old|new)\.doc?' files
eject
eject [options] [device]
Eject removable media such as a CD-ROM, floppy, tape, or JAZ or
ZIP disk. You may name the device by its /dev or /mnt filename.
The /dev and /mnt prefixes are optional for any items in the /dev
and /mnt directories. If no