3 ms·
Unless find has been changed since the last time I tangled with it; you need to explicitly put the search path in first (which yours doesn't do), which since th
by billswift 16y ago
Unless find has been changed since the last time I tangled with it; you need to explicitly put the search path in first (which yours doesn't do), which since that is opposite the utilities I used more often, I kept forgetting to. Second, find seems to react weirdly to wildcards in search terms, I sometimes ended up rerunning it with slightly different search terms to be find the file I wanted.
Maybe I just wasn't using find right, but several introductory linux books have also claimed it is hard to use. Before I found the du -a | grep idea, I was using one I read somewhere else of grepping a directory listing (made by ls -lR ~/ > dir) rather than use find.
- tspiteri 16y agoThe man page says that if path is omitted in find [path...] [expression] the current directory is used. I don't know if it's just that way for GNU find, or if it's standard Posix find behaviour. Regarding the wildcards in search statements, I usually just need to match a case-sensitive substring, so I use something like: find -name '*sub*' I don't know of any weird wildcard reactions, but that may be because I don't usually use complex searches or matches. One last thing, if you don't mind all the "./" prefixes, "find ." (or just "find") is just like "du -a" without the block counts.