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
1.4m articles
1.4m replys
5 comments
57.0k users