home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13292 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1009 b   |  32 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!hela.iti.org!usc!rpi!cecchinr
  3. From: cecchinr@hornsby.cs.rpi.edu (Ron Cecchini)
  4. Subject: A few more quick C questions...
  5. Message-ID: <c-r1bx#@rpi.edu>
  6. Nntp-Posting-Host: hornsby.cs.rpi.edu
  7. Organization: Rensselaer Polytechnic Institute, Troy, NY
  8. Date: Thu, 12 Nov 1992 20:29:39 GMT
  9. Lines: 21
  10.  
  11. Hi again -
  12.  
  13.  Thanx to everyone who responded to my read/write question of a few days ago.
  14.  
  15.  I just have a couple of *quick* C questions:
  16.  
  17. 1) Is there a command to see if a file exists?
  18.    [Can't just use fopen() - it returns NULL for more than one reason...]
  19.  
  20. 2) Is there a command to determine a file's size?
  21.    [I think the data structure pointed to by a FILE contains a ->_cnt feild
  22.     that can be used - I'll try it in a minute...]
  23.  
  24. 3) Is there a command to determine if a user is logged in?
  25.    [I don't want to bother with a system("who | grep user > temp"), etc.]
  26.  
  27. 4) Is there a command to determine if a user is running a certain process?
  28.  
  29. Thanx again,
  30. Ron
  31.  
  32.