|
grep is used to check a value that's inside file's.
grep root /etc/passwd for example wil list all lines (1 in this case) that have the word root in them.
ls will list files, if you add *txt it will list all files ending with txt
wc prints the number of bytes, words, and/or lines
ls *txt | wc -l
The above command will list all files ending with txt (ls *txt) and count the amount of hits (wc -l)
See manpages to find out what other options each command has (man ls, man wc and man grep).
Hope this gets you on th right track again.
Last edited by druuna; 11-17-2003 at 12:36 PM.
|