On Monday 17 May 2004 04:22 pm, Robert Paulsen wrote:
On Monday 17 May 2004 19:35, James Knott wrote:
Robert Paulsen wrote:
On Monday 17 May 2004 03:43, Jerome Lyles wrote:
You need to put quotes around the expression you are looking for if it contains special characters that the shell will act on (in your case the *). Try this...
find / -name "*.rpm"
You want the find command to see the *, not the shell.
It works fine for me without the quotes. However, this is on Red Hat 7.3.
If there are no *.rpm files in the current directory then it will work w/o the quotes. Try the following:
touch xxx.rpm find . -name *.rpm find . -name "*.rpm"
Assuming there are some rpm files to find in subdirectories you should see the difference. -- Robert C. Paulsen, Jr. robert@paulsenonline.net
I tried it and I do see the difference! So, if there are rpms in the current directory then the shell expands the special character *. If there are not rpms in the current directory then the shell does not expand the special characters for other directories. This is useful to know, thank you, Jerome