#1 glark does not like symlinks


While banchmarking glark and grep I noticed that glark
does not recognize looping symlinks.

In my /var/tmp directory i have a symlink "tmp" that
points back to /var/tmp.
Glark did not skip this, just kept looping for about 63
minutes until it stopped.
Grep however finished within a minute.

Command used:
grep -re --binary-files=without-match "arguments" .


  • Jeff Pace

    Jeff Pace - 2006-02-27

    Logged In: YES

    Thanks for the feedback. That will be fixed in 1.7.8.

  • Nobody/Anonymous

    Logged In: NO

    Ruby has: File.symlink? filename
    So this should be a nice and easy fix.
    [I just noticed you're follow up below so this is probably all very moot.]

    Test on command line:
    1) Create a file
    $ echo "test" > in

    2) Create a symlink from that file
    $ ln -s in in0

    3) Check if its a symlink (the "l" in the directory spot and the "in0 --> in"
    $ ls -l in0
    lrwxr-xr-x 1 joe joe 2 Mar 6 17:34 in0 -> in

    4) Check what ruby thinks of it
    $ ruby -e "puts File.stat('in0').ftype"

    5) Does Ruby's symlink? function find it, yes
    $ ruby -e "puts File.symlink?('in0')"

    Its up to you but I think you could simply add this function call to FileTester#test, just a simple check for a symlink and make it UNREADABLE or have options to follow it. (I don't actually know what grep does in this instance).

  • Nobody/Anonymous

    Logged In: NO

    And sure enough this has been fixed already. So my bad again.
    Change the status?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks