[nzlug] Checking for directories that are symbolic links

Hadley Rich nzlug at nice.net.nz
Fri Feb 23 17:22:31 NZDT 2007


On Fri, 23 Feb 2007 17:11:03 Johann Schoonees wrote:
> In bash scripts, how would I check if a directory name is a symlink or
> not?  The conditional in
>
> if [ -d $dirname ]

-L will test for a link, man bash for more fun tests.

hads

-- 
http://nicegear.co.nz
New Zealand's VoIP supplier




More information about the NZLUG mailing list