将 10 天前的文件移动到不同目录的 cron 作业
cron job to move 10 day old files to different directory
我需要一个脚本,我可以从 cron 作业 运行 将 10 天或更早的文件移动到不同的目录。作为 windows 系统管理员,我不知道我在 linux 中做什么。 :( 有人能指出我正确的方向吗?
提前致谢。
find /source/directory/* -mtime +10 -exec mv "{}" /my/directory \;
使用 'crontab -e' 打开您的 crontab 并根据需要将其设置为 运行。
我需要一个脚本,我可以从 cron 作业 运行 将 10 天或更早的文件移动到不同的目录。作为 windows 系统管理员,我不知道我在 linux 中做什么。 :( 有人能指出我正确的方向吗?
提前致谢。
find /source/directory/* -mtime +10 -exec mv "{}" /my/directory \;
使用 'crontab -e' 打开您的 crontab 并根据需要将其设置为 运行。