Thread: which utility in UNIX

  1. #16
    FOSS Enthusiast
    Join Date
    Jun 2008
    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

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, 03:21 PM
  2. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 10: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, 08: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