Skip to content

Instantly share code, notes, and snippets.

@mortymacs
Created August 25, 2024 08:06
Show Gist options
  • Save mortymacs/7dcef45c2edac129eaa35807ec063d5a to your computer and use it in GitHub Desktop.
Save mortymacs/7dcef45c2edac129eaa35807ec063d5a to your computer and use it in GitHub Desktop.
Check file in C
#include <unistd.h>
#include <stdio.h>
int main()
{
if(access("a.sh", F_OK) != -1)
{
printf("Exists!\n");
}
else
{
printf("Not Found!\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment