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.
我有一个包含一些子目录 {users} 的文件夹,例如“Michael”、“Jackson”等 pp。每个 userdir: 中还有其他子目录:cur和new,tmp这些是 Maildirs。
cur
new
tmp
我需要一个脚本,它可以将所有文件/邮件从每个用户移动new到另一个用户。cur
我该如何开始做这样的事情?
假设您的当前目录是包含所有用户的目录,您可以这样做:
for user in *; do mv "$user"/new/* "$user"/cur/.;done