我有这个文件结构
user@laptop:/my/folder$ ls
control changelog patches postrm source
copyright.in mime postinst rules
并希望列出名称中没有点的所有文件。不想使用 grep。反向看起来像:
user@laptop:/my/folder$ ls *[.]*
copyright.in
但是当我尝试添加否定(^ 或!)来实现我的目标时,它不起作用:
user@laptop:/my/folder$ ls *[^.]*
control copyright.in changelog mime postinst postrm rules
patches:
series 03-include-unistd-for-kfreebsd
01-manpages-in-section-1-not-in-section-1l 04-unzip60-alt-iconv-utf8
02-branding-patch-this-is-debian-unzip 04-unzip60-alt-iconv-utf8~
source:
format
在输出中列出了copyright.in,这不是我想要的。我什么时候写??而不是*,它可以工作。:
user@laptop:/my/folder$ ls *[^.]??
control changelog mime postinst postrm rules
patches:
series 03-include-unistd-for-kfreebsd
01-manpages-in-section-1-not-in-section-1l 04-unzip60-alt-iconv-utf8
02-branding-patch-this-is-debian-unzip 04-unzip60-alt-iconv-utf8~
source:
format
任何人都知道如何使用通配符在名称中不带点的目录中创建文件列表?