The pemission denied messages are normal. If you're running as a normal user (and you should
) you're not allowed to access all files. The reasons vary from security issues to the privacy of other users at the system.
Something that gave me some problems with the find command:
* you need to use wildcards, to indicate there can be something before or after the name.
* the -name search is case-sensitive. Use -iname for incase-sensitive searching.
find /some/folder/ -iname "*file*"
You can also use the locate command to find something quickly.
'locate' uses a database created by 'updatedb'. In the crontab (or /etc/cron.*) folders, and "updatedb" is scheduelled to run every frequently.
Grep can be used to filter text from a steam, file, or search for text in files. You can supply a regular-expression for more advanced pattern searching.
grep -E "\((WW|EE)\)" /var/log/XFree86.0.log
The (WW|EE) expression selects WW or EE from the file. the \( and \) force grep to parse the text literally.
Grep can be used to search multiple files:
grep -i -R "some pattern" ...directories
grep -i "some pattern" ...file list
And select a certain pattern from a steam: (the pipe symbol redirects the output to 'grep')
edit: and to supress the error mesages: (redirect stderr;2 to /dev/null)
find /some/folder/ -name ... 2>/dev/null