查找没有扩展名的可执行文件?
问题描述:
以下程序列出目录中的所有文件,但是如何只显示那些没有扩展名的“可执行”文件?查找没有扩展名的可执行文件?
find $workingDir/testcases -type f -perm -og+rx | while read file
do
echo $file
done
答
你可以使用:
find $workingDir/testcases -type f ! -name "*.*" -perm -og+rx
答
#!/bin/bash
DIR="./";
find $DIR -type f -perm -og+rx | while read file
do
echo $file | egrep -v "\.[^/]+$";
done
什么呢``怎么办?我不知道它的存在 – Quamis 2010-12-09 12:08:28