There should be something elegant in Linux API/POSIX to extract base file name from full path
See char *basename(char *path).
char *basename(char *path)
Or run the command "man 3 basename" on your target UNIX/POSIX system.
man 3 basename
2.1m questions
2.1m answers
60 comments
57.0k users