I have a specific problem at my hand right now. I have core* files in my /tmp/ folder on linux.
I want to know how to check if the file core* exists in /tmp/ path. The actual file can be anything like below. * corexyz.txt * coreabc.tar.gz * core*
Please provide your valuable answers.
If the complete file name was known, I could have used stat or access to know if the file existed. But here, I want to know if there is any file with core*.
bool checkFile (std::string ABC)
{
/* Check if the file abc* exists */
return true; /* return true if file ABC* exists */
}