Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您如何通过以下正则表达式查找文件?
[^.]
解决方案可能在命令中:find、perl、ls
perl -MFile::Find -le 'find sub { print if -f and /[^.]/ }, "."'
这将在当前目录和所有子目录中查找没有句点的文件。
如果它是关于文件名,就像格雷格认为的那样,那么我建议
find . -type f -not -name \*.\*
而是命令。
ls | grep -v \\.
如果这不能满足您的要求,您可能必须更具体地说明您的问题。