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

Home » Public Forums » archive » Findfile finds no files
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
Findfile finds no files [message #29979] Tue, 02 April 2002 18:43 Go to next message
Pete  Riley is currently offline  Pete Riley
Messages: 3
Registered: April 2002
Junior Member
Hi,

I just came across a weird problem I'm not sure if it's been talked about
before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
findfile() last week and everything worked out fine. Today, it returns no
files, even with

Print,findfile('*')

Yet $ls shows all the files in the current directory.

Has anyone come across this?

Thanks in advance, Pete
Re: Findfile finds no files [message #30037 is a reply to message #29979] Thu, 04 April 2002 02:56 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Pete Riley wrote:
>
> Thanks for the suggestions. It turns out that my / partition was full.
> Deleting some log files and cache fixed the problem....at least temporarily.
> Anyone know of a good way to dynamically resize linux partitions without
> deleting the data on it? (and I don't have a windows partition so Partition
> Magic won't work).

Dear Pete,

I am using partition magic but bootet from a floppy.
works fine.

A very good guide is
http://mobilix.org/Mobile-Guide.db/Mobile-Guide.html

specially
http://mobilix.org/Mobile-Guide.db/mobile-guide-p1c3s3-linux -tools-to-repartition.html




Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
Re: Findfile finds no files [message #30042 is a reply to message #29979] Wed, 03 April 2002 21:27 Go to previous messageGo to next message
Pete  Riley is currently offline  Pete Riley
Messages: 3
Registered: April 2002
Junior Member
Thanks for the suggestions. It turns out that my / partition was full.
Deleting some log files and cache fixed the problem....at least temporarily.
Anyone know of a good way to dynamically resize linux partitions without
deleting the data on it? (and I don't have a windows partition so Partition
Magic won't work).

-Pete

On 4/2/02 18:43, in article B8CFAC37.6C53%uk2@mac.com, "Pete Riley"
<uk2@mac.com> wrote:

> Hi,
>
> I just came across a weird problem I'm not sure if it's been talked about
> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
> findfile() last week and everything worked out fine. Today, it returns no
> files, even with
>
> Print,findfile('*')
>
> Yet $ls shows all the files in the current directory.
>
> Has anyone come across this?
>
> Thanks in advance, Pete
>
Re: Findfile finds no files [message #30047 is a reply to message #29979] Wed, 03 April 2002 17:19 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard Younger (younger@ll.mit.edu) writes:

> If you can't find a satisfactory solution, since you're in 5.5 (and if
> you don't need backwards compatibility), you might open up your What's
> New and take a look at file_search(). Supposedly, findfile() is now
> deprecated in favor of it.

Isn't *File*underscore*Search" a bit of regression in the
function naming game? Or have I missed the change in naming
conventions again? I notice as I grow older that it's not
one damn thing after the other. It's the same damn thing
over and over again. :-(

But I would have thought "FileSearch" would have been hipper.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Findfile finds no files [message #30049 is a reply to message #29979] Wed, 03 April 2002 16:18 Go to previous messageGo to next message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Hi, Pete.

If you can't find a satisfactory solution, since you're in 5.5 (and if
you don't need backwards compatibility), you might open up your What's
New and take a look at file_search(). Supposedly, findfile() is now
deprecated in favor of it.

Best,
Rich

Pete Riley wrote:

> I just came across a weird problem I'm not sure if it's been talked about
> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
> findfile() last week and everything worked out fine. Today, it returns no
> files, even with
>
> Print,findfile('*')
>
> Yet $ls shows all the files in the current directory.

--
Richard Younger
Re: Findfile finds no files [message #30056 is a reply to message #29979] Wed, 03 April 2002 12:05 Go to previous messageGo to next message
Stein Vidar Hagfors H[1] is currently offline  Stein Vidar Hagfors H[1]
Messages: 56
Registered: February 2000
Member
Pete Riley <uk2@mac.com> writes:

> Hi,
>
> I just came across a weird problem I'm not sure if it's been talked about
> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
> findfile() last week and everything worked out fine. Today, it returns no
> files, even with
>
> Print,findfile('*')
>
> Yet $ls shows all the files in the current directory.
>
> Has anyone come across this?

I think I came across something similar a loong time ago, on various
unix systems. The problem arises when you have extremely many (long)
file names matching the pattern. The reason is that findfile uses
(used?) the "ls <pattern>" command, resulting in a file-name
expansion that causes an error with too long command lines.

Note: If I'm correct, I think you'll get all of the files by using
findfile with no arguments (i.e. spawning an ls command with no
filename expansion of the command line)!

The only way I've found around it is to write a separate find_file
function that uses e.g. "find -name '<pattern>' -print" on unix systems.

--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
Re: Findfile finds no files` (linux NFS bug) [message #30133 is a reply to message #30056] Sat, 06 April 2002 11:27 Go to previous messageGo to next message
Robert Stockwell is currently offline  Robert Stockwell
Messages: 74
Registered: October 2001
Member
> Pete Riley <uk2@mac.com> writes:
>
>
>> Hi,
>>
>> I just came across a weird problem I'm not sure if it's been talked about
>> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
>> findfile() last week and everything worked out fine. Today, it returns no
>> files, even with
>>
>> Print,findfile('*')
>>
>> Yet $ls shows all the files in the current directory.
>>
>> Has anyone come across this?
>>

I have, and had to write a piece of code that first checked
the OS, then if *nix, spawned a system command (ls) and then
where'd and strposed the results to get the filtered list.

I would like to point out another file list bug, that caused
many a grey hair.

Under linux redhat 7.0, the NFS has a bug in that for a directory
containg many files (12000 in my case), the filenames are not reported
correctly. Some files will be missing in the ls commands, and some will
be repeated. There are about 5% errors, i.e. a few hundred of files went
missing in ls commands, and a few hundred were repeated in the
'ls' command result.

By "missing" I mean that the file is really there, and can be opened and read
directly, but any "ls" command will not have the file in the result.

This caused my analysis of a large satellite data set to have many small holes
in it, which were only uncovered after I carefully went through the results.
UGH!

Upgrading linux to 7.2 seems to solve the problem



Cheers,
bob stockwell
Re: Findfile finds no files [message #30150 is a reply to message #30056] Fri, 05 April 2002 12:17 Go to previous messageGo to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Stein Vidar Hagfors Haugan <shaugan@esa.nascom.nasa.gov> writes:

> Pete Riley <uk2@mac.com> writes:

>> Hi,
>>
>> I just came across a weird problem I'm not sure if it's been talked about
>> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
>> findfile() last week and everything worked out fine. Today, it returns no
>> files, even with
>>
>> Print,findfile('*')
>>
>> Yet $ls shows all the files in the current directory.
>>
>> Has anyone come across this?

> I think I came across something similar a loong time ago, on various
> unix systems. The problem arises when you have extremely many (long)
> file names matching the pattern. The reason is that findfile uses
> (used?) the "ls <pattern>" command, resulting in a file-name
> expansion that causes an error with too long command lines.

> Note: If I'm correct, I think you'll get all of the files by using
> findfile with no arguments (i.e. spawning an ls command with no
> filename expansion of the command line)!

> The only way I've found around it is to write a separate find_file
> function that uses e.g. "find -name '<pattern>' -print" on unix systems.

> --
> ------------------------------------------------------------ --------------
> Stein Vidar Hagfors Haugan
> ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

> NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
> Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
> Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
> ------------------------------------------------------------ --------------


Pete:

The behavior you describe is the exact symptom of the problem that Stein Vidar
refers to. You can find Stein Vidar's find_file.pro procedure at

ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/system/

I've gotten into the habit of using that instead of the built-in findfile.

William Thompson
Re: Findfile finds no files [message #30529 is a reply to message #30150] Sun, 05 May 2002 11:32 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dear all,

as I remember correctly findfile is an obsolete routine since idl5.5.
The new routine is file_search.

With this routine a lot of find_file problems are solved.

regards
Reimar




William Thompson wrote:
>
> Stein Vidar Hagfors Haugan <shaugan@esa.nascom.nasa.gov> writes:
>
>> Pete Riley <uk2@mac.com> writes:
>
>>> Hi,
>>>
>>> I just came across a weird problem I'm not sure if it's been talked about
>>> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
>>> findfile() last week and everything worked out fine. Today, it returns no
>>> files, even with
>>>
>>> Print,findfile('*')
>>>
>>> Yet $ls shows all the files in the current directory.
>>>
>>> Has anyone come across this?
>
>> I think I came across something similar a loong time ago, on various
>> unix systems. The problem arises when you have extremely many (long)
>> file names matching the pattern. The reason is that findfile uses
>> (used?) the "ls <pattern>" command, resulting in a file-name
>> expansion that causes an error with too long command lines.
>
>> Note: If I'm correct, I think you'll get all of the files by using
>> findfile with no arguments (i.e. spawning an ls command with no
>> filename expansion of the command line)!
>
>> The only way I've found around it is to write a separate find_file
>> function that uses e.g. "find -name '<pattern>' -print" on unix systems.
>
>> --
>> ------------------------------------------------------------ --------------
>> Stein Vidar Hagfors Haugan
>> ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO
>
>> NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
>> Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
>> Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
>> ------------------------------------------------------------ --------------
>
> Pete:
>
> The behavior you describe is the exact symptom of the problem that Stein Vidar
> refers to. You can find Stein Vidar's find_file.pro procedure at
>
> ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/system/
>
> I've gotten into the habit of using that instead of the built-in findfile.
>
> William Thompson

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: color bar..
Next Topic: Re: drawing lines interactively

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

Current Time: Wed Oct 08 14:52:19 PDT 2025

Total time taken to generate the page: 0.00707 seconds