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.
为什么 'save$' 不能匹配名为的文件save?
save
root@debian:/home/tiger# ls /home/test save root@debian:/home/tiger# find /home/test -regex 'save$' root@debian:/home/tiger# find /home/test -regex '.*save$' /home/test/save
因为正则表达式与完整路径(即/home/test/save)匹配,而不仅仅是文件名“save”。