** Description changed:
- The man page says:
+ The find(1) man page says:
--wholename pattern
- File name matches shell pattern pattern. The metacharacters do
not treat `/' or `.' specially; so, for example,
- find . -wholename './sr*sc'
- will print an entry for a directory called './src/misc' (if one
exists). To ignore a whole directory tree, use -prune rather than checking
every
- file in the tree. For example, to skip the directory
`src/emacs' and all files and directories under it, and print the names of the
other files
- found, do something like this:
- find . -wholename './src/emacs' -prune -o -print
+ - wholename pattern
+ File name matches shell pattern pattern. The metacharacters do not treat
`/' or `.' specially; so, for example,
+ find . -wholename './sr*sc' will print an entry for a directory called
'./src/misc' (if one exists). To ignore a whole
+ directory tree, use -prune rather than checking every file in the
tree. For example, to skip the directory
+ `src/emacs' and all files and directories under it, and print the names
of the other files found, do something like
+ this:
+ find . -wholename './src/emacs' -prune -o -print
Okay, so let's try it:
[EMAIL PROTECTED]:~/foo$ mkdir splat
[EMAIL PROTECTED]:~/foo$ mkdir gronk
[EMAIL PROTECTED]:~/foo$ mkdir gronk/fluff
[EMAIL PROTECTED]:~/foo$ find . -wholename './gronk/' -prune -o -print
./gronk
./gronk/fluff
./splat
... !
I just figured out that the problem is the trailing / in my pattern.
Hm. I'm used to writing a trailing / whenever I write a directory
name. I wonder if it is possible for the man page to disabuse the
casual reader of this assumption...
** Description changed:
The find(1) man page says:
- wholename pattern
- File name matches shell pattern pattern. The metacharacters do not treat
`/' or `.' specially; so, for example,
- find . -wholename './sr*sc' will print an entry for a directory called
'./src/misc' (if one exists). To ignore a whole
- directory tree, use -prune rather than checking every file in the
tree. For example, to skip the directory
- `src/emacs' and all files and directories under it, and print the names
of the other files found, do something like
- this:
+ File name matches shell pattern pattern. The metacharacters do not treat
`/' or `.' specially;
+ so, for example, find . -wholename './sr*sc' will print an entry for a
directory called './src/misc'
+ (if one exists). To ignore a whole directory tree, use -prune rather
than checking every file
+ in the tree. For example, to skip the directory `src/emacs' and all
files and directories under
+ it, and print the names of the other files found, do something like this:
find . -wholename './src/emacs' -prune -o -print
Okay, so let's try it:
[EMAIL PROTECTED]:~/foo$ mkdir splat
[EMAIL PROTECTED]:~/foo$ mkdir gronk
[EMAIL PROTECTED]:~/foo$ mkdir gronk/fluff
[EMAIL PROTECTED]:~/foo$ find . -wholename './gronk/' -prune -o -print
./gronk
./gronk/fluff
./splat
- ... !
+ Directory gronk and its subtree is not skipped, while I was expecting
+ that to happen.
- I just figured out that the problem is the trailing / in my pattern.
- Hm. I'm used to writing a trailing / whenever I write a directory
- name. I wonder if it is possible for the man page to disabuse the
- casual reader of this assumption...
+ The problem is the trailing / in my pattern. I'm used to writing a
+ trailing / whenever I write a directory name. I wonder if it is
+ possible for the man page to disabuse the casual reader of this
+ assumption.
--
example in man page doesn't work (due to user making assumption...)
https://bugs.launchpad.net/bugs/6087
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs