Solaris
1.Distinguish between the grep, egrep, and fgrep commands.
__el comando grep busca el contenido de uno o mas archivos por un patron
__el comando egrepbusca el contenido de uno mas archivos por uno o mas patrones usando metacaracteres
__el comando fgrep busca un archivo literalmente o un grupo de caracteres
2.Search for the text string other in the/etc/group file. Display it to
the screen.
__grep other /etc/group
3.Using the grep command, look for all lines in the file4 file located
in your home directory that do not contain the letter M.
__cd__grep -v M file4
4.Display all lines in the files dante, file1, and dante_1 that contain
the pattern he.
__grep he dante file1 dante_1
5.Display all the the lines in the file file4 that containeither the pattern
Sales or Finance.
__grep '(Sales|Finance)' file4
6.Which option is peculiar to the grep command but does not apply to
the egrep and fgrep commands?
__la opcion -w
7.Display all thelines that have the pattern load in the /etc/system
file.
__grep load /etc/system
8.Use the grep command to display how many lines contain at least
one instance of the word module (uppercase andlowercase) in the
/etc/system file.
__grep -ic module /etc/system
9.Use the grep command to record how many instances of the word
Module (uppercase M only) appear in the /etc/system file.
__grep -c module/etc/system
10. Starting in your home directory, find all files that were modified in
the last one day.
__find /export/home/ftr -mtime -1
11. Use the find command to search the /etc directory forall the files
owned by the user lp.
__find /etc -user lp
12. Starting in your home directory, find all files of type f for file.
__find ~ -type f
13. In your home directory, find all files of type dfor directory.
__find ~ -type d
14. From your home directory, use the find command with an option
that prompts you before removing any files, to search for ordinary
files of size 0 (zero) in the...
Regístrate para leer el documento completo.