如何定期清理服务器里面的垃圾

如何定期清理服务器里面的垃圾,第1张

清理服务器里面的垃圾用了不少软件还是自己设置的方式好用

下面几个方法绝对让你服务器飞起来,不借助任何软件就可以达到一劳永逸的结果

1找清理程序

找一些清理和优化系统批处理程序,这个网上很多,直接搜索就可以了,如果对dos命令

熟悉也可以自己写批处理程序,我这里有一份直接粘贴这里,把下面命令指令全部复制到自己新建的文本文档中,改文本文档的txt后缀为bat,这样我们就制作完成一个系统清理批处理程序了

@echo off

echo 服务优化正在处理,请稍等

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 清除系统完成 开始优化系统! 

sc config ALG start= DEMAND

sc config AppMgmt start= DEMAND

sc config AudioEndpointBuilder start= AUTO

sc config Audiosrv start= AUTO

sc config BFE start= AUTO

sc config BITS start= AUTO

sc config Browser start= AUTO

sc config CertPropSvc start= DEMAND

sc config clr_optimization_v2050727_32 start= DEMAND

sc config COMSysApp start= DEMAND

sc config CryptSvc start= AUTO

sc config DcomLaunch start= AUTO

sc config Dhcp start= AUTO

sc config Dnscache start= AUTO

sc config dot3svc start= DEMAND

sc config EapHost start= DEMAND

sc config EventSystem start= AUTO

sc config fdPHost start= DEMAND

sc config FDResPub start= DEMAND

sc config FontCache3000 start= DEMAND

sc config gpsvc start= AUTO

sc config hidserv start= DEMAND

sc config hkmsvc start= DEMAND

sc config idsvc start= DEMAND

sc config IKEEXT start= AUTO

sc config IPBusEnum start= DEMAND

sc config KeyIso start= DEMAND

sc config LanmanServer start= AUTO

sc config LanmanWorkstation start= AUTO

sc config lltdsvc start= DEMAND

sc config lmhosts start= AUTO

sc config MMCSS start= AUTO

sc config MpsSvc start= AUTO

sc config msiserver start= DEMAND

sc config napagent start= DEMAND

sc config Netlogon start= DEMAND

sc config Netman start= DEMAND

sc config netprofm start= AUTO

sc config NetTcpPortSharing start= DISABLED

sc config NlaSvc start= AUTO

sc config NOD32krn start= AUTO

sc config nsi start= AUTO

sc config PlugPlay start= AUTO

sc config ProfSvc start= AUTO

sc config RasAuto start= DEMAND

sc config RasMan start= DEMAND

sc config RemoteAccess start= DISABLED

sc config RpcLocator start= DEMAND

sc config RpcSs start= AUTO

sc config SamSs start= AUTO

sc config SCardSvr start= DEMAND

sc config SCPolicySvc start= DEMAND

sc config SENS start= AUTO

sc config SharedAccess start= DISABLED

sc config ShellHWDetection start= AUTO

sc config slsvc start= AUTO

sc config SLUINotify start= DEMAND

sc config SNMPTRAP start= DEMAND

sc config SSDPSRV start= DEMAND

sc config SstpSvc start= DEMAND

sc config SysMain start= AUTO

sc config TapiSrv start= DEMAND

sc config TBS start= AUTO

sc config Themes start= AUTO

sc config THREADORDER start= DEMAND

sc config TrustedInstaller start= DEMAND

sc config upnphost start= DEMAND

sc config UxSms start= AUTO

sc config vds start= DEMAND

sc config W32Time start= AUTO

sc config wcncsvc start= DEMAND

sc config WcsPlugInService start= DEMAND

sc config Win>

用bat批量打开ie浏览器方法是,新建文本,写入startc:\progra~1\Intern~1\iexploreexe要打开几个窗口就复制几行,另存为bat文件就可以了。

例子:要打开3个ie浏览器,文本写入

startc:\progra~1\Intern~1\iexploreexe

startc:\progra~1\Intern~1\iexploreexe

startc:\progra~1\Intern~1\iexploreexe

保存为bat文件,执行就可。

批处理(Batch),也称为批处理脚本。顾名思义,批处理就是对某对象进行批量的处理,通常被认为是一种简化的脚本语言,它应用于DOS和Windows系统中。批处理文件的扩展名为bat 。

如果需要实现更复杂的应用,利用外部程式是必要的,这包括系统本身提供的外部命令和第三方提供的工具或者软件。批处理程序虽然是在命令行环境中运行,但不仅仅能使用命令行软件,任何当前系统下可运行的程序都可以放在批处理文件中运行。

批处理应用于DOS和Windows系统中,它是由DOS或者Windows系统内嵌的命令解释器(通常是COMMANDCOM或者CMDEXE)解释运行。类似于Unix中的Shell脚本。批处理文件具有bat或者cmd的扩展名,其最简单的例子,是逐行书写在命令行中会用到的各种命令。更复杂的情况,需要使用if,for,goto等命令控制程序的运行过程,如同C,Basic等中高级语言一样。

多道批处理系统中各道程序可以同时运行以提高系统效率说法正确。多道程序设计技术是在计算机内存中同时存放几道相互独立的程序,使它们在管理程序控制下,相互穿插运行。当某道程序因某种原因不能继续运行下去时候,管理程序就将另一道程序投入运行,这样使几道程序在系统内并行工作,可使中央处理机及外设尽量处于忙碌状态,从而大大提高计算机使用效率。在批处理系统中采用多道程序设计技术形成多道批处理系统,多个作业成批送入计算机,由作业调度程序自动选择作业运行,这样提高了系统效率。

以上就是关于如何定期清理服务器里面的垃圾全部的内容,包括:如何定期清理服务器里面的垃圾、怎样编写一个批处理程序备份当前系统的IP配置信息到C:\ipbak.txt、怎么用bat批量打开ie浏览器等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/9275842.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-26
下一篇 2023-04-26

发表评论

登录后才能评论

评论列表(0条)

保存