I have run into a strange behavior with Find command. When I use the command without the trailing slash in the directory name, it returns nothing. When I add the trailing slash, it recurses through the directory and list all the subdirectories.
find /tdd/general/performance -- This doesn't work
find /tdd/general/performance/ -- This works.
For other folders, it makes no difference but for this particular folder it does provide any results without the trailing slash.
Can someone please enlighten me as why this is happening. Thank you in advance for the help.
I guess /tdd/general/performance is a reference: a symbolic link or an automount point.
For a symbolic link you can use find -H /tdd/general/performance
The -H follows a symlink in the given start directory.
An automount behavior is implementation-specific.
Regarding the Linux autofs, I have seen that a first access to a bare directory name returns the unmounted/arbitrary attributes but then fosters the mount; a subsequent access returns the attributes of the mounted filesystem.
In Solaris an access to a bare directory name immediately mounts then returns the attributes.
A trailing / ensures a directory; this always fosters an early mount.
not exactly what I asked, but good enough.
As @MadeInGermany mentioned here, this directory is a link.
Hence, follow (pun intended) what's been suggested.
In order to properly format the posts, one needs to use the "markdown code tags" outlined here in the forum welcome page.
This is done to ease the reading of the posts, and (among others) to distinguish the free-form posts' text AND the code/data sample.
E.g. to format data/code samples enclose it in the triple-backticks (```) like so
``` here comes my data sample ```
that will result in (when posted):
here comes my data sample
Read the provide link above to get a better handle on what markdown code tags are and/or what's available.