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 / -name .*,但它返回“路径必须在表达式之前:..”并且不知道这是否包括所有可能由 elvis 或 nano 创建的文件。
我见过几个版本的“备份”文件名模式,但最常见的总是包含一个~. 如果你只是在寻找,~那么这样的东西会起作用......
~
find / -name '*~*'
如果你想找到隐藏文件,那么...
find / -name '.*'
将名称放在引号中:
否则外壳会解释它并运行类似的东西:
find / -name . ..