php清除垃圾代码,服务器_清理Windows服务器的垃圾文件的批处理,复制代码 代码如下: @echo off ech - phpStudy...

清理Windows服务器的垃圾文件的批处理

复制代码 代码如下:

@echo off

echo 正在清理系统垃圾文件,请稍等......

del /f /s /q %systemdrive%\*.tmp

del /f /s /q %systemdrive%\*._mp

del /f /s /q %systemdrive%\*.log

del /f /s /q %systemdrive%\*.gid

del /f /s /q %systemdrive%\*.chk

del /f /s /q %systemdrive%\*.old

del /f /s /q %systemdrive%\recycled\*.*

del /f /s /q %windir%\*.bak

del /f /s /q %windir%\prefetch\*.*

rd /s /q %windir%\temp & md %windir%\temp

del /f /q %userprofile%\cookies\*.*

del /f /q %userprofile%\recent\*.*

del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"

del /f /s /q "%userprofile%\Local Settings\Temp\*.*"

del /f /s /q "%userprofile%\recent\*.*"

echo 清理系统垃圾完成!

echo. & pause

保存为bat后缀的就可以了。

实际应用价值:

针对服务器突发性的日志和垃圾文件过多影响iis的正常运行时,垃圾文件过多会影响服务器运行速度

做为服务器管理和维护人员,建议平时做好垃圾文件的清理。

以下做详细说明@echo off (不显示后续命令及当前命令行)

echo 正在清除系统垃圾文件,请稍等...... (屏幕显示“正在清除系统垃圾文件,请稍等......”)

del /f /s /q %systemdrive%\*.tmp (强行删除系统算在磁盘根目录中扩展名为.tmp的文件)

del /f /s /q %systemdrive%\*._mp (强行删除系统算在磁盘根目录中扩展名为._mp的文件)

del /f /s /q %systemdrive%\*.log (强行删除系统算在磁盘根目录中扩展名为.log的文件)

del /f /s /q %systemdrive%\*.gid (强行删除系统算在磁盘根目录中扩展名为.gid的文件)

del /f /s /q %systemdrive%\*.chk (强行删除系统算在磁盘根目录中扩展名为.chk的文件)

del /f /s /q %systemdrive%\*.old (强行删除系统算在磁盘根目录中扩展名为.old的文件)

del /f /s /q %systemdrive%\recycled\*.* (清空回收站,如果回收站清空了,这一句其实也派不上用处的)

del /f /s /q %windir%\*.bak (强行删除当前启动的系统的所在目录中扩展名为.bak的文件)

del /f /s /q %windir%\prefetch\*.* (强行删除当前启动的系统的所在目录中prefetch文件夹中的所有文件)

rd /s /q %windir%\temp & md %windir%\temp (将系统中的temp文件夹删除后再新建一个temp文件夹)

del /f /q %userprofile%\cookies\*.* (删除当前用户文件夹中cookies文件夹中的所有文件)

del /f /q %userprofile%\recent\*.* (删除当前用户文件夹中recent文件夹中的所有文件)

del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" (删除当前用户文件夹中Local Settings\Temporary Internet Files\中的所有文件)

del /f /s /q "%userprofile%\Local Settings\Temp\*.*" (删除当前用户文件夹中LocalSettings\Temp\中的所有文件)

del /f /s /q "%userprofile%\recent\*.*" (删除当前用户文件夹中recent文件夹中的所有文件)

echo 清除系统垃圾完成! (屏幕显示“清除系统垃圾完成!”)

echo. & pause (屏幕显示“Press any key to continue...”)注:echo.的作用是使屏幕上回显一空行

------------------------------------------------------------

@echo off

@ color 1a 显示背景和前景文字颜色( 详细请看下面)

echo 正在清理系统垃圾文件,请稍等...... 不起作用,文字显示

del /f /s /q %systemdrive%\\*.tmp 删除系统目录下的全部临时文件,一般都没用的,安装软件遗留的.

del /f /s /q %systemdrive%\\*._mp 和上面同理

del /f /s /q %systemdrive%\\*.log 删除日志文件,一般也没用

del /f /s /q %systemdrive%\\*.gid

del /f /s /q %systemdrive%\\*.chk 删除windows扫描文件,一般是chkdisk 的遗留文件

del /f /s /q %systemdrive%\\*.old 删除多余的临时备份文件

del /f /s /q %systemdrive%\\recycled\\*.* 清空回收站

del /f /s /q %windir%\\*.bak 删除windows备份文件

del /f /s /q %windir%\\prefetch\\*.*

rd /s /q %windir%\\temp & md %windir%\\temp

del /f /q %userprofile%\\cookies\\*.* 删除上网遗留的cookies一般是windows为了加快网页打开速而设置的,

del /f /q %userprofile%\\recent\\*.* 删除历史记录

del /f /s /q \"%userprofile%\\Local Settings\\Temporary Internet Files\\*.*\" 删除ie临时文件del /f /s /q

del /f /s /q \"%userprofile%\\Local Settings\\Temp\\*.*\" 删除软件临时文件

del /f /s /q \"%userprofile%\\recent\\*.*\"

echo. & pause相关阅读:

总结MYSQL的优化

cygwin 在windows下使用linux命令的方法

CSS first-letter实现首字下沉

ASP.NET备份恢复SqlServer数据库

GHOST XP 安装教程

Tomcat设置类似IIS的访问密码

MYSQL中单一表超过4G的对策

Windows7环境下直接装低版本的XP系统

MySQL不支持InnoDB的解决方法

未释放事件Handler可能导致内存泄漏

ASP.NET 2005 Treeview终极解决方案

HTML表格标记教程(2):表格的边框属性BORDER

在Linux系统下单网卡实现双IP的设置

phpwind解决搜索到回收站中内容的问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"C:\Program Files\Java\jdk-1.8\bin\java.exe" -Dmaven.multiModuleProjectDirectory=F:\workmode\h5xjxj\ech-log-server\ech-log-api -Djansi.passthrough=true -Dmaven.home=F:\dev_software\apache-maven-3.6.3 -Dclassworlds.conf=F:\dev_software\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=F:\idea2023\IntelliJ IDEA 2023.1.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:F:\idea2023\IntelliJ IDEA 2023.1.2\lib\idea_rt.jar=53993:F:\idea2023\IntelliJ IDEA 2023.1.2\bin" -Dfile.encoding=UTF-8 -classpath F:\dev_software\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;F:\dev_software\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2023.1.2 -s C:\Users\田文成\.m2\settings_XJ_git.xml -Dmaven.repo.local=F:\dev_software\repository\localRepository\localRepository install [INFO] Scanning for projects... [INFO] [INFO] -----------------------< com.ai.ecs:ech-log-api >----------------------- [INFO] Building ech-log-api 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- Downloading from nexus1: http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.280 s [INFO] Finished at: 2023-07-12T16:30:43+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexus1 (http://mgr.devstone.cn:18080/nexus/content/groups/public): Transfer failed for http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom: Connect to mgr.devstone.cn:18080 [mgr.devstone.cn/218.94.91.233] failed: Connection timed out: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 刚导入项目依赖报错
07-13
根据错误提示,你的项目在下载依赖时遇到了问题。具体来说,它无法解析或下载以下插件及其依赖项: ``` Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to nexus1 (http://mgr.devstone.cn:18080/nexus/content/groups/public): Transfer failed for http://mgr.devstone.cn:18080/nexus/content/groups/public/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom: Connect to mgr.devstone.cn:18080 [mgr.devstone.cn/218.94.91.233] failed: Connection timed out: connect -> [Help 1] ``` 根据错误信息,问题可能是由于以下原因之一引起的: 1. 网络连接问题:由于连接超时导致无法从指定的URL下载所需的插件和依赖项。请确保你的网络连接正常,并且可以访问指定的URL(http://mgr.devstone.cn:18080)。 2. 仓库配置问题:你的项目可能配置了一个不可用的仓库(nexus1),导致无法下载插件和依赖项。请检查你的项目配置文件(如settings.xml)或构建脚本,确保仓库配置正确。 3. Maven中心仓库问题:如果你使用的是默认的Maven中心仓库(https://repo1.maven.org/maven2/),请尝试清理Maven本地仓库缓存(通常位于`~/.m2/repository/`目录下),然后重新构建项目。 解决这个问题的方法包括: 1. 检查网络连接:确保你的网络连接正常,并且可以访问指定的URL(http://mgr.devstone.cn:18080)。 2. 检查仓库配置:检查你的项目配置文件(如settings.xml)或构建脚本,确保仓库配置正确,并且指向可用的仓库。 3. 清理本地仓库缓存:如果你使用的是默认的Maven中心仓库,尝试清理Maven本地仓库缓存,然后重新构建项目。 如果问题仍然存在,建议进一步排查网络连接问题,或联系你的开发团队或仓库管理员以获取更多帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值