basename

The basename command removes the directory part of a file name. Followed by a suffix, it also allows to remove this suffix.

basename f1
basename /home/lambda/f1
basename /home/lambda/f1.txt .txt