查找没有扩展名的可执行文件?

问题描述:

以下程序列出目录中的所有文件,但是如何只显示那些没有扩展名的“可执行”文件?查找没有扩展名的可执行文件?

find $workingDir/testcases -type f -perm -og+rx | while read file 
do 
     echo $file 
done 

你可以使用:

find $workingDir/testcases -type f ! -name "*.*" -perm -og+rx 
+0

什么呢``怎么办?我不知道它的存在 – Quamis 2010-12-09 12:08:28

#!/bin/bash 

DIR="./"; 

find $DIR -type f -perm -og+rx | while read file 
do 
    echo $file | egrep -v "\.[^/]+$"; 
done