On Sat, Apr 24, 1999 at 12:09:27PM -0600, Marcelo E. Magallon wrote:
> Hi,
>
>  is:
>
>         file -b dangling_symlink | grep -q '^broken symbolic link to'
>
>  a good way to test for a dangling_symlink?  I'm worried about
>  locales...

[EMAIL PROTECTED](4:57pm)-~/test]%ls -l
total 0
lrwxrwxrwx   1 root     root            7 Apr 24 16:57 broken -> no_file
-rw-r--r--   1 root     root            0 Apr 24 16:57 real_file
lrwxrwxrwx   1 root     root            9 Apr 24 16:57 working -> real_file

[EMAIL PROTECTED](4:57pm)-~/test]%test -f broken || echo broken link
broken link

[EMAIL PROTECTED](4:58pm)-~/test]%test -f working || echo broken link
[EMAIL PROTECTED](4:58pm)-~/test]%

--
-----    -- - -------- --------- ----  -------  -----  - - ---   --------
Ben Collins <[EMAIL PROTECTED]>                        Debian GNU/Linux
OpenLDAP Dev - [EMAIL PROTECTED]     The Choice of the GNU Generation
------ -- ----- - - -------   ------- -- ---- - -------- - --- ---- -  --

Reply via email to