which utility in UNIX

This is a discussion on which utility in UNIX within the C Programming forums, part of the General Programming Boards category; I think access() can't be used because it will also fail if the file exists but the permissions don't allow ...

  1. #16
    FOSS Enthusiast
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    64
    I think access() can't be used because it will also fail if the file exists but the permissions don't allow accessing it

    Edit:
    I just realized, that you would have the same problem with stat(), but you can check if errno is [EACCES], because in that case the file exists, but the access was simply denied
    Last edited by mkruk; 06-20-2008 at 06:52 AM. Reason: addendum

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. unix fold utility
    By Sgemin_001 in forum C Programming
    Replies: 20
    Last Post: 12-08-2008, 02:21 PM
  2. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 09:54 AM
  3. Setting up a Unix box
    By @nthony in forum Tech Board
    Replies: 6
    Last Post: 07-22-2007, 10:22 PM
  4. UNIX (Linux, BSD, etc) Programming :: UNIX
    By kuphryn in forum Linux Programming
    Replies: 6
    Last Post: 04-01-2004, 07:44 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21