Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:23:40+00:00 2026-06-13T00:23:40+00:00

I went through the Linux man page for access command, but not sure about

  • 0

I went through the Linux man page for access command, but not sure about the application of the command.

Can someone explain this.

Can it be used like this:

access -f filename;

If i want to check whether the file is existing or not?
But I am getting an error :

The transaction failed: no-cache,

Same thing happens with:

 access -w filename;

if I want to check whether the file is writable by current user.

Also this can also easily be done with test command easily. Then what is the exact difference between these two commands. Please elaborate.
thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:23:41+00:00Added an answer on June 13, 2026 at 12:23 am

    That is not a Linux command. It’s C function that can be loaded through the unistd.h library.

    You can use it in a C program as follows:

    #include <unistd.h>
    #include <stdio.h>
    
    int main () {
       int writeable;
       writeable = access("/path/to/file", W_OK);
       if (writeable == -1)
           printf("Not writeable!");
       else
           printf("Writeable!";
    
       return 0;
    }
    

    Note that it returns 0 on success. And 0 is false for C and many other languages, but in this case it means true.

    The fact that you can see man access doesn’t mean at all that it’s a Linux command as any standard Linux distribution has man pages for every C library and function. You can also see man malloc. You can determine if it’s a Linux command or a C library man page by viewing the header. For example man access:

    ACCESS(2)                  Linux Programmer's Manual                 ACCESS(2)
    
    NAME
           access - check real user's permissions for a file
    
    SYNOPSIS
           #include <unistd.h>
    
           int access(const char *pathname, int mode);
    

    As you can see, the first line states Linux Programmer's Manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I went through the tutorial here: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application , and I can get a graph
I went through tons of questions about this subject, but still failed to find
I went through a similar question here . But I am yet not clear
I went through these instructions: http://docs.amazonwebservices.com/AmazonRDS/latest/GettingStartedGuide/ But still can't connect to the database using
I went through couple of articles that talk about Web Workers in HTML5 and
I just went through writing a fairly lengthly application in c++ using mingw and
I went through all the steps with eclipse indigo, and I can't seem to
I went through the Book and I've copied code from the section http://book.cakephp.org/view/1460/RSS but
I went through this tutorial Your First iPhone Application and it worked great. My
I went through a lot of questions here, but it is still unclear. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.