Linux common commands -96: basename

The basename command is mainly used to display the file name with the file path name excluding the directory part.

Syntax format: basename [parameter]

Common parameters:


 basename /etc/nginx/sites-enabled/default

 basename /etc/nginx/nginx.conf

 # 显示文件名,不显示后缀basename /etc/nginx/nginx.conf .conf

This article is reprinted from
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment