comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » recursive FILE_SEARCH in a symbolic link ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
recursive FILE_SEARCH in a symbolic link ? [message #71376] Thu, 17 June 2010 11:28 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi guys,

I have a directory containing some symbolic links. When I try to do a
recursive file search, IDL does not take into account the links.
Do you know how can I do this search, through all the links ?
I want to avoid Windows errors so I need an standard solution...

Thanks in advance,
nata
Re: recursive FILE_SEARCH in a symbolic link ? [message #71456 is a reply to message #71376] Fri, 18 June 2010 05:55 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Thank you guys,

Why I didn't find this explanation in the documentation ?
Anyway, I have to change some directories....
Have a great day,
nata
Re: recursive FILE_SEARCH in a symbolic link ? [message #71457 is a reply to message #71376] Fri, 18 June 2010 05:06 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Fri, 18 Jun 2010 01:37:23 -0700 (PDT), Maarten wrote:

> On Jun 18, 4:13 am, nata <bernat.puigdomen...@gmail.com> wrote:
>> Hi Heinz,
>>
>> Thank you for your reply.
>> My problem is using symlinks in Linux and trying to do the recursive
>> search through them.
>
> This is documented in the file_search help. To avoid infinite loops,
> file_search will not search within symlinks to directories.
>
Yes, I was too careless last night. In reading manuals ;-( and in
performing tests. This morning I put a file into the folder, which is
the target of a symbolic link. Corresponding to the manual file_search
does not see this file (in the symbolic link). It does not find the
file in both syntaxes, the recursive and the standard one. So the
results on Linux and on Windows are the same. At least for the
recursive search.

By the way cygwin does not to create real symbolic links. It simulates
them by using Windows-shortcuts.

Heinz
Re: recursive FILE_SEARCH in a symbolic link ? [message #71461 is a reply to message #71376] Fri, 18 June 2010 01:37 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Jun 18, 4:13 am, nata <bernat.puigdomen...@gmail.com> wrote:
> Hi Heinz,
>
> Thank you for your reply.
> My problem is using symlinks in Linux and trying to do the recursive
> search through them.

This is documented in the file_search help. To avoid infinite loops,
file_search will not search within symlinks to directories.

You can recreate the tree, and populate the tree with symlinks to the
files. Just make sure that all directories are real. Another
alternative is to just don't do Windows, and use the unix find tool
through spawn to find your stuff.

Best,

Maarten
Re: recursive FILE_SEARCH in a symbolic link ? [message #71465 is a reply to message #71376] Thu, 17 June 2010 19:13 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi Heinz,

Thank you for your reply.
My problem is using symlinks in Linux and trying to do the recursive
search through them.
More details:

My folder contains 4 symlinks and I'm doing the search in the "base"
folder.
test/symlink-1 -> data/dir1
test/symlink-2 -> data/dir2
test/symlink-3 -> data/dir3
test/symlink-4 -> data/dir4


I do, file_search('test','*') and the result is nothing. data/dir1
contains 10 files, data/dir2 contains 10 files more, etc.
If I do file_search('test/symlink-1') the result is correct but the
recursive search does not work if I use the test directory. That's
what I'm trying to do...

Thanks for your help,
nata
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: sort arrays based on names
Next Topic: invalid screen number error

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:40:07 PDT 2025

Total time taken to generate the page: 0.00421 seconds