True if file exists and is a directory.
The operator also returns True if the file exists and is a symlink to a directory
-bash-4.1$ file foo
foo: directory
-bash-4.1$ file bar
bar: symbolic link to `foo'
-bash-4.1$ if [ -d bar ]; then echo "bar is a directory"; fi
bar is a directory
-bash-4.1$ if [ -h bar ]; then echo "bar is a symlink"; fi
bar is a symlink
-bash-4.1$ bash -version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
If this is intended behavior, the manual page and other documentation should be updated to reflect it.
Thanks.