find -name does not work as expected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
findutils (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
On my dapper system (findutils 4.2.27-1ubuntu1), the `find` program does not give me accurate results.
In my ~/test directory, I have one .txt file and one .asp file. In a subdirectory called includes, I have another .txt file and another .asp file. However, `ls` and `find` do not agree.
Where the files are:
andy@
test.txt
andy@
includes/test.txt
andy@
default.asp
andy@
includes/
The first problem is that running find from the root of the folder tree does not return "includes/
andy@
./default.asp
Howeer, the .txt files are reported as expected:
andy@
./test.txt
./includes/
If I try to find the asp files from the from the parent directory however, it is correct.
andy@schooler:~$ find test -name *.asp
test/
test/default.asp
All files are owned by andy - modes on all dirs 755, all files 644.
Cheers
Changed in findutils: | |
status: | Unconfirmed → Rejected |
Try putting *.txt and *.asp in single quotes:
find . -name '*.asp'
Everything will work as expected.
This bug can be closed as invalid.