Windows 定时删除指定路径下N天前的日志文件 Windows 下bat脚本文件的内容为 1. 删除指定路径下5天前的所有文件 @echo off set SrcDir=E:\WORK\Git set DaysAgo=5 forfiles /p %SrcDir% /s /m *.*/d -%DaysAgo% /c "cmd /c del /f /q /a @path" 2.删除指定路径下5天前的所有log文件 @echo off set SrcDir=E:\WORK\Git //指
1.ftp自动上传文件脚本 #!/bin/bash ftp -n<<! open 192.168.220.129 user ls toor binary hash cd /path/to/backup lcd /path/to/need/backup prompt mkdir `date +"%Y%m%d"` cd `date +"%Y%m%d"` mput * close bye ! open行--要备份到的主机IP user行--ls为要备份到的主机
包括只读类型 Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] namesERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names Specifies a list of one or more files or directories. Wildcards may be used to delete multiple files. If a di