dirname and basename¶
dirname : Directory Name¶
This command will print the path of the directory in which file exists
basename :¶
This command will print the filename that will not include the path
To print the file extension only¶
Then run