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.
我有以下行:
for FILE in $(find "${DIR}" -type f -mtime +14 -level 0)
问题是,如果我有一个名为“New Document.txt”的文件,第一次传递时 $FILE 的值将是“New”,第二次传递时它将是“Document”。我如何让它保持文件名在一起?
我在 Windows 环境中运行它,如果这有区别的话。
而不是使用 for 循环使用 while 循环
find "${DIR}" -type f -mtime +14 -level 0 |while read FILE do ls -l "${FILE}" done
祝你好运