DEV Community

Santiago Zarate
Santiago Zarate

Posted on • Originally published at on

When find can't find

If you happen to be using gnu find in the deadly combination with a directory that is a symlink (you just don’t know that yet), you will find face the hard truth that running:

find /path/to/directory -type f

Will return zero, nada , nichts, meiyou , which is annoying.

where is it!

this will make you question your life decisions, and your knowledge on tools that you use daily, only to find out that the directory is actually a symlink :).

So next time you find yourself using find and it returns nothing, but you are sure that your syntax is correct and get no errors, try adding the --fowllow or use the -L

find -L /path/to/directory/with/symlink -type f

This will do what you want :)

Here is it!

Top comments (0)