help on PWD

Hi,

We all know that pwd (or echo $PWD) gives us the present working dir as output.... but my doubt is that I'ld like to know how to get the present working folder - I mean - name of the current folder alone.. using pwd command I get the full folder name (right from root path)... I need to know to complete a adhoc request.. so any help shall be highly appreciated...

Thanks,
Mohan. :slight_smile:

Here is a simple way.

basename `pwd`

vino

thanks vino.. I never thought it'ld be so simple.. thanks again for the quick reply.. :slight_smile: