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 8942347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:29:35+00:00 2026-06-15T11:29:35+00:00

I am using ubuntu linux and i am just a beginner is c language

  • 0

I am using ubuntu linux and i am just a beginner is c language i have created a program that creates a lock file when started inside a folder but both the file and folder are with [DOT] like .folder and .file and linux hides such files and folders and i have another program that checks if the file exists or not if it exists then the program is running and if it doesn’t then its not simple here is my code

FILE* lockfile = fopen("/.folder/.lock", "r");
if (!lockfile) {
    printf("Cannot find lock file");
} else {
    printf("lock file found");
}

the folder is in the root directory and i just wanna read the file so i gave “r” as the access i made a lot of search but only found answers to windows based programs can anyone point out where am i wrong or any solution for it?
how can i read hidden files and folders in linux through c?

EDIT: added images to make things a bit more clear

folder

The .folder directory it has all the permission for the current user

file

The .lock file also has the read permission for the current user so i don’t think there is a problem with the permission or i am still wrong?

  • 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-15T11:29:36+00:00Added an answer on June 15, 2026 at 11:29 am

    There is no such thing as a “hidden” file in *nix. The leading dot is a convention followed by tools to inhibit their display, but there is no difference between them and any other filesystem object of the same type in the system.

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

Sidebar

Related Questions

I have just started using Ubuntu as my first Linux, have a couple of
I just started using Ubuntu Linux for the first time. I know the GIT
I just started writing assembly language programs on linux(ubuntu) and know for a fact
I just started using linux (Ubuntu) and switched to IntelliJ as my new IDE.
I have a following problem: I compiled my application on Linux Ubuntu 9.10 using
I'm a newbie to Linux systems and recently I started using Ubuntu 10.04. When
I've just tried using gdb on BackTrack Linux and I must say that its
Well I´m just moving in to Linux, so I´m using Ubuntu, I installed Ubuntu
I have a Swecoin/Zebra TTP2030 USB-LPT receipt printer that I am using on Ubuntu.
Using VirtualBox inside of Windows7, it has Ubuntu. Just installed rails 3.1 and getting

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.