RE: open file descriptors

1998-09-10 Thread David Ross
> From [EMAIL PROTECTED] Thu Sep 10 09:55:21 1998 > From: Paul Brown <[EMAIL PROTECTED]> > To: "'David Ross'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: open file descriptors > Date: Thu, 10 Sep 1998 13:54:46 +0200 > X-Priority: 3 > Sender: [EMAIL PROTECTED] >

Re: function parameters

1998-09-10 Thread Glynn Clements
James wrote: > ->printf ("Hello","world","\n","%d%d%d", 2, 0, 35); > - > -This isn't a legitimate printf() call. The format string has to be a > -single argument, e.g. > > oops, i meant > printf ("Hello ""World ""\n"); /* No ,'s between */ > > so that if you have a huge printf() lin

Re: max dir length

1998-09-10 Thread Glynn Clements
James wrote: > just for compatabilities sake, what's the maximum number of directory > entries (is it infinite?) No, the directory entry only allows 32 bits for the inode number, so you're limited to ~4E9 entries. > i've picked 255 for no good reason, this sound sane? Nope. If you want to rea

Re: flex

1998-09-10 Thread Glynn Clements
James wrote: > flex would let me parse files wouldn't it? at the moment i have a > horrendous parsing routine that contains a few gotos in it (aargh :) > and is generally really complicated ( = slow) and not nice. > What i want parsing is similar to C source (but not the same, it > contains bloc

Re: uptime

1998-09-10 Thread Glynn Clements
James wrote: > where's the source to 'uptime' live? and what's the format of > /proc/uptime? (there's some numbers, but what do they mean). The entry is created in root.c; the code which generates the data is in array.c. Both files are in fs/proc. -- Glynn Clements <[EMAIL PROTECTED]>

Re: open file descriptors

1998-09-10 Thread Glynn Clements
Karl F. Larsen wrote: > > > Does anyne know how to find out how many open file descriptors there are > > > at any one time on a linux box? > > > Any help would be appreciated.. > > > > > > Try this one! > > > > $ cat /proc/sys/kernel/file-nr > > 360 > > I did that and it worked just fine. I

Re: max dir length

1998-09-10 Thread Salil Kumr
In UNIX a Dir is a represented as a file internally so the possible max dir size ia same as for a file. further, each entry may require an inode (hard links are exceptions) so the max possible entries for a directory depends upon the number of inodes in the filesystes also. my answer is baced on F

Re: thanks for reply

1998-09-10 Thread James
On 9 Sep 1998, Robert Linnemann wrote: -I just have one question why do I need a ./ before executing an executable this should be in a FAQ... you need to do this because it tells your shell (the thing that you type commands into) to look in the current directory (which is '.'), this isn't inclu

Re: function parameters

1998-09-10 Thread James
On Wed, 9 Sep 1998, Glynn Clements wrote: -> printf ("Hello","world","\n","%d%d%d", 2, 0, 35); - -This isn't a legitimate printf() call. The format string has to be a -single argument, e.g. oops, i meant printf ("Hello ""World ""\n"); /* No ,'s between */ so that if you have a hug

RE: main()

1998-09-10 Thread James
On Wed, 9 Sep 1998, Niels Hald Pedersen wrote: -If you want a pascallish structure of C programs, use function -prototypes: this is what i do... apart from making it 'nicer' for the compiler, it can also trap errors like forgetting a parameter when writing the function itself. I wasn't actually

directories

1998-09-10 Thread James
forget it i've worked it out... open a dir with opendir(), have a loop that repeatedly calls readdir(). now i need repeated calls to stat() to find out the file size... -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]http://x-m

Re: uptime

1998-09-10 Thread James
On Wed, 9 Sep 1998, Karl F. Larsen wrote: - - Why don't you write a bash file that will do just that? - because uptime reads /proc/uptime and you can't modify it (i broke my kernel source trying :), so i can't just copy a new file into it... what i want is to be able to type 'uptime' and i

directories

1998-09-10 Thread James
how do i obtain a list of all files in a directory? i've tried playing with 'getdirentries' but what does it want for the offset and the size? It wants a filedescriptor too (int fd), do i obtain one by doing: int fd; fd = open ("/some/dir/i/want/", O_RDONLY); /* and what about trailing /'s? */

flex

1998-09-10 Thread James
flex would let me parse files wouldn't it? at the moment i have a horrendous parsing routine that contains a few gotos in it (aargh :) and is generally really complicated ( = slow) and not nice. What i want parsing is similar to C source (but not the same, it contains blocks of data enclosed in {}

No Subject

1998-09-10 Thread kdefault
Hi to all, how can load detect the files list of current dir ? is there a function that keep information about the current dir structure ? regards and tnx to all

Re: open file descriptors

1998-09-10 Thread Karl F. Larsen
I did that and it worked just fine. I have 180. But what ARE they? On Thu, 10 Sep 1998, David Ross wrote: > > > On Thu, 10 Sep 1998 10:01:03 +0200 Paul Brown wrote: > > > Does anyne know how to find out how many open file descriptors there are > > at any one time on a linux box? > > Any help

Re: file locations

1998-09-10 Thread Kevin Sivits
On Thu, 10 Sep 1998, James wrote: > where's the 'standard' place for my program binaries to go? > /usr/local/bin or /usr/bin ? > and documentation should go in /usr/doc/ > manpages in /usr/man/... (and how do i write manual pages anyway?) The /usr directory is usually reserved for programs, libr

Re: Compiling code for linux

1998-09-10 Thread James
On Wed, 9 Sep 1998, Brett Thompson wrote: -cow:~/c$ cat >> foo.cc you don't write code like this do you? :) try 'ed' you'll find it easier! suppose you could do this: cat >> foo.c; gcc foo.c; cat a.out > foo who needs an IDE! Best one i have is called bash. -- +++ Divide By Cucumber Error,

file locations

1998-09-10 Thread James
where's the 'standard' place for my program binaries to go? /usr/local/bin or /usr/bin ? and documentation should go in /usr/doc/ manpages in /usr/man/... (and how do i write manual pages anyway?) -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMAIL PROTECTED]

Pensions - Have you considered yours?

1998-09-10 Thread sales
First or Second Class retirement, which would you prefer? Saving and Investing for your retirement is the largest financial commitment you will ever make. With careful planning and selective Investment management we offer our clients the first class ticket to a prosperous retirment. Review you

max dir length

1998-09-10 Thread James
just for compatabilities sake, what's the maximum number of directory entries (is it infinite?), i've picked 255 for no good reason, this sound sane? what?! suppose sending this'd help (it's been sat here all night) -- +++ Divide By Cucumber Error, Please Re-Install Universe And Reboot +++ [EMA

RE: open file descriptors

1998-09-10 Thread Glynn Clements
Paul Brown wrote: > > > Does anyne know how to find out how many open file descriptors there are > > > at any one time on a linux box? > > > Any help would be appreciated.. > > > > > > Try this one! > > > > $ cat /proc/sys/kernel/file-nr > > 360 > > Thanks for the response, but I meant how m

RE: open file descriptors

1998-09-10 Thread Paul Brown
Hi, Thanks for the response, but I meant how many are open at the time of running the program/script. Ie, the more files open, the higher the number, etc. > Does anyne know how to find out how many open file descriptors there are > at any one time on a linux box? > Any

Re: open file descriptors

1998-09-10 Thread Glynn Clements
Paul Brown wrote: > Does anyne know how to find out how many open file descriptors there are > at any one time on a linux box? This information should be available from /proc/sys/kernel/file-nr. -- Glynn Clements <[EMAIL PROTECTED]>

AW: open file descriptors

1998-09-10 Thread TBaetzle
Hi Paul, you asked: > Does anyne know how to find out how many open file descriptors there > are > at any one time on a linux box? > See man lsof(8). HTH, Thomas

Re: open file descriptors

1998-09-10 Thread David Ross
On Thu, 10 Sep 1998 10:01:03 +0200 Paul Brown wrote: > Does anyne know how to find out how many open file descriptors there are > at any one time on a linux box? > Any help would be appreciated.. Try this one! $ cat /proc/sys/kernel/file-nr 360 $ Regards, david -- David Ross [EMAIL PROTEC

RE: function parameters

1998-09-10 Thread Niels Hald Pedersen
Look at the [g]libc docs, there is a quite good explanation of it here (I think the chapter is called "language support" or something like that). (these docs comes installed as .info files with many distributions; one can also find the latest glibc-someversion.tar.gz at sunsite.unc.edu or other g

open file descriptors

1998-09-10 Thread Paul Brown
Hi, Does anyne know how to find out how many open file descriptors there are at any one time on a linux box? Any help would be appreciated.. Cheers Paul

X-Server.

1998-09-10 Thread Hari
Hello All!! Could any one tell me which X-server would support a SiS Accelerated video card? Can one use any accelerated X-server for this purpose? Thanks in advance, Hari.

Re: thanks for reply

1998-09-10 Thread Christoph Bugel
> I just have one question why do I need a ./ before executing an executable a dot (.) is a 'link' to the current directory. just like .. is the 'parent' directory. so ./a.out means : the a.out in the current directory. Unix shells don't look in the current directory by default. so when you typ

No Subject

1998-09-10 Thread Akmal Abdullah
remove

Re: uptime

1998-09-10 Thread Azog
On Wed, 09 Sep 1998, Ford Prefect wrote: > On Tue, 8 Sep 1998, James wrote: > > > I've been thinking about this for a while... > > is there some patch that'll store my pc's uptime when i reboot (so it'd > > really be a cumulative-uptime). > > There's an appentry on Freshmeat for a program that