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