extract only file name from full path file name

What is the smartest way to just extract file name from a full path name.
e.g. if I have
/usr/sanjay/bin/file_name.c

I want only file_name.c

Sanjay

basename "/path/to/some/file"

:wink:

  • dEvNuL

Thanks devnul for sharing the information.

It really works.

Sanjay