Quantcast
Viewing all articles
Browse latest Browse all 2845

Linux basename Command Tutorial for Beginners (with Examples)

Sometimes, while working on the command line (especially when dealing with shell scripts), you might be interested in only the filename, but what's available to you is the complete path of the file. So, the requirement is to strip the directory component of the path. You'll be glad to know there exists a command - basename - that does this job.

Viewing all articles
Browse latest Browse all 2845

Trending Articles