dirname command examples

dirname command examples

dirname – strip last component from file name

dirname /usr/bin/
-> "/usr"
dirname dir1/str dir2/str
-> "dir1" followed by "dir2"
dirname stdio.h
-> "."

 

Leave a Reply

Your email address will not be published. Required fields are marked *