用途basename
:
find /opt/g09 -maxdepth 1 -executable -exec basename {} \;
来自man basename
:
Print NAME with any leading directory components removed.
另外,您正在尝试find
所有操作,以将搜索限制为仅文件,请使用:
find /opt/g09 -type f -maxdepth 1 -executable -exec basename {} \;