int main(int argc, char** argv) {
int file_size_limit = atoi(argv[1]);
char buf[BUFSIZ];
snprintf(buf, sizeof(buf), "find . -size +%dc -printf %M ", file_size_limit);
system(buf);
return 0;
}
The above code does not work and gives the warning: unknown conversion type character ‘M’ in format, how am I able to display only file permission with this structure. Thanks in advance!
I have tried to and double quotes on %M but this also gives an error, I cannot find a way to encode the %M deceleration into the find code since the whole command is passed in as an argument of the snprintf function