如果C盘满了怎么办简单清理一下

C盘清理命令大全:轻松释放存储空间 通过上述C盘清理命令,我们可以快速且有效地释放C盘中的存储空间,提高系统性能。不过,在执行这些命令之前,请务必确保已经备份了重要数据,以防误删导致数据丢失。此外,对于不熟悉命令行操作的用户来说,建议在执行前仔细阅读命令说明,并在测试环境中进行尝试。希望本文能够帮助大家更好地管理C盘空间,享受更加流畅的电脑使用体验。 阅读详情

面对C盘空间告急的问题,程序员可以采取多种方法进行优化处理,以保持开发环境的稳定运行。以下是一些适用于Windows、Linux和macOS等主流操作系统的优化建议,以及对应的脚本程序或软件推荐。

Windows 系统

  1. 清理临时文件:

    • 可以使用Windows自带的“磁盘清理”工具,或是执行以下PowerShell脚本来删除临时文件:
    # 清理临时文件
    Remove-Item -Path "$env:TEMP\*" -Recurse -Force
    
  2. 删除不再使用的软件:

    • 检查并卸载不再需要的软件,可以使用以下命令在CMD中列出已安装的软件:
    wmic product get name
    
  3. 使用CCleaner等第三方工具:

    • CCleaner是一款流行的系统清理工具,可以帮助用户轻松清理临时文件、缓存等多余数据。
  4. 转移用户文件:

    • 可以将文档、下载等用户文件移动到D盘等其他硬盘,释放C盘空间。

工具脚本

  • Windows: 早些年的时候有一个专门的批处理可以帮助WIN系统提升系统运行速度,脚本程序出字德国,期初是用于WindowsXP,该脚本批处理列出了4 个选项:1.LAN 、2.Standard、3.ALL 、4.Restore。按数字键选择:LAN 适用局域网,Standard适用有Internet但没局域网,ALL 则使用了讨论最为激进的优化方案。如果对修改后的效果不满意,重新运行,选择4.Restore,可以恢复之前的设置。
    你会发现你的电脑变得速度飞快,此法对于配置较低的电脑尤其有效。
    这里附上代码可以供研究的朋友做下深度修改。
@echo off
cls
rem Copyright (C) 2003-05 Ansgar Wiechers & Torsten Mann
rem Contact: admin@ntsvcfg.de
rem
rem This program is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free Software Foundation;
rem either version 2 of the License, or (at your option) any later version.
rem This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
rem without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
rem See the GNU General Public License for more details.
rem
rem You should have received a copy of the GNU General Public License along with this program;
rem if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
rem MA 02111-1307, USA.
echo.
REM Tested on ... WinXP_SP2
REM Always basic XP64 Support
REM Modifications to BITS service (cause of v5 WindowsUpdate) - #discharged#
REM Additional notices corresponding to DHCP issue
REM Variables problems during RESTORE_DEFAULT usage fixed
REM SMBDEVICEENABLED Restore Bug fixed
REM Mod_history-09-27-2005**11-08-2005**11-29-2005**12-07-2005**12-18-2005
setlocal
REM *** INIT_VARS ***
set CHK_SVC=YES
set XPSP2=FALSE
set SERVER=FALSE
set NT_SERVER_CHK=TRUE

:START
echo  "svc2kXp.cmd" v2.2_build7b (18.12.2005), published under GNU GPL
echo  ================================================================
set find=%SystemRoot%\System32\find.exe
set regedit=%SystemRoot%\regedit.exe
if not exist "%find%" goto :NOFIND
if not exist "%regedit%" goto :NOREGEDIT
if not "%1" == "%*" goto :SYNTAX
if /I "%1"=="/?" goto :HELP
if /I "%1"=="/help" goto :HELP
if /I "%1"=="-h" goto :HELP
if /I "%1"=="--help" goto :HELP
if /I "%1"=="-?" goto :HELP
if /I "%1"=="--?" goto :HELP
if /I "%1"=="/fix" goto :FIX
goto :VERSION
:SYNTAX
echo.
echo.
echo  !!Syntax error!!
echo  ________________
echo  Es kann nur ein oder kein Parameter angegeben werden.
echo.
echo  Only one or no parameter allowed.
goto :QUIT
:HELP
echo.
echo                                 -= Hilfe =-
echo  Parameter:
echo  /lan.......Einige Dienste fuer LAN-Betrieb werden nicht veraendert.
echo  /std.......Schliesst alle Ports, einige Dienste bleiben unveraendert.
echo  /all.......Setzt alle Vorschlaege nach www.ntsvcfg.de um (hardening).
echo  /restore...Nimmt die zuletzt vorgenommenen Aenderungen zurueck.
echo  /reLAN.....Reaktiviert Dienste, die fuer LAN-Betrieb benoetigt werden.
echo  /default...Setzt alle Diensteinstellungen auf urspr黱gliche Werte zur點k.
echo.
echo  Parameters:
echo  /lan.......Some services needed for LAN-usage stay unchanged!
echo  /std.......Closes all Ports, but some services stay unchanged
echo  /all.......Changes all issues recommended by www.ntsvcfg.de ("hardening")
echo  /restore...Undo last changes.
echo  /reLAN.....Reactivates services required for LAN.
echo  /default...Restoring factory service settings (before first time usage)
echo.
echo  example: svc2kxp.cmd /all
echo.
set /P CHS= [Press "G" for GNU GPL informations or "Q" for quit]?
if /I "%CHS%"=="G" goto :GNU_GPL
if /I "%CHS%"=="Q" goto :QUIT_EXT
CLS
goto :HELP
:GNU_GPL
CLS
echo  Informations about GNU-General Public License for "svc2kxp.cmd"
echo  ===============================================================
echo.
echo  Copyright (C) 2003-05 Ansgar Wiechers, Torsten Mann
echo  Contact: admin@ntsvcfg.de
echo.
echo  This program is free software; you can redistribute it and/or modify it under
echo  the terms of the GNU General Public License as published by the Free Software
echo  Foundation; either version 2 of the License, or (at your option) any later
echo  version. This program is distributed in the hope that it will be useful, but
echo  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
echo  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
echo  details.
echo.
echo  You should have received a copy of the GNU General Public License along with
echo  this program; if not, write to the:
echo.
echo  Free Software Foundation, Inc.
echo  59 Temple Place, Suite 330
echo  Boston, MA 02111-1307, USA.
echo.
set /P CHS= [Press "H" for help or "Q" for quit]?
CLS
if /I "%CHS%"=="H" goto :HELP
if /I "%CHS%"=="Q" goto :QUIT_EXT
goto GNU_GPL
:VERSION
echo  Checking system version ...

if /I "%NT_SERVER_CHK%"=="FALSE" goto :SKIP_NT_SERVER_CHK
REM Checking for running server version
        "%regedit%" /e "%TEMP%\~svr.txt" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"
                 type "%TEMP%\~svr.txt"|"%find%" /i "Server" >NUL
                if not errorlevel 1 set SERVER=TRUE
                 type "%TEMP%\~svr.txt"|"%find%" /i "LanMan" >NUL
                if not errorlevel 1 set SERVER=TRUE
                if exist "%TEMP%\~svr.txt" del /F /Q "%TEMP%\~svr.txt"
                if /I "%SERVER%"=="TRUE" goto :NTSERVER

:SKIP_NT_SERVER_CHK
ver | "%find%"  /i "Windows 2000" > nul
if not errorlevel 1 goto :OS2K
ver | "%find%"  /i "Windows XP" > nul
if not errorlevel 1 goto :OSXP
ver | "%find%"  /i "Microsoft Windows [Version 5.2.3790]" > nul
if not errorlevel 1 goto :OSXP64
echo  !!Failed!!
echo  __________
echo.
echo  Dieses Script ist nur unter Windows 2000 oder XP lauffaehig!
echo.
echo  This script works only on Windows 2000/XP machines!
echo.
goto :QUIT
:NOFIND
echo.
echo  !!Failed!!
echo  __________
echo.
echo  Leider konnte folgende Datei nicht gefunden werden:
echo.
echo  Sorry, but following file is missing:
echo.
echo.
echo  # %SystemRoot%\System32\FIND.EXE
echo.
echo.
goto :QUIT
:NOREGEDIT
echo.
echo  !!Failed!!
echo  __________
echo.
echo  Leider konnte folgende Datei nicht gefunden werden:
echo.
echo  Sorry, but following file is missing:
echo.
echo.
echo  # %SystemRoot%\REGEDIT.EXE
echo.
echo.
goto :QUIT
:NTSERVER
echo.
echo  !!Failed!!
echo  __________
echo.
echo  Dieses Script unterstuetzt keine NT Server Versionen!
echo.
echo  This script doesn't support NT server versions!
echo.
goto :QUIT

:OS2K
rem Specific OS Detection I
set SYSTEM=2k
rem Testing for XP ServicePacks
        "%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
        type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 4" >NUL
        if errorlevel==1 (
                  type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 3" >NUL
                  if errorlevel==1 (
                        type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL
                          if errorlevel==1 (
                                type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL
                                if errorlevel==1 (
                                        echo  !Windows 2000 [no or unknown Service Pack] detected!
                                        goto NO_2KSP
                                        )
                                echo  !Windows 2000 [Service Pack 1] detected!
                                  goto :NO_2KSP
                                )

                        echo  !Windows 2000 [Service Pack 2] detected!
                          goto :NO_2KSP
                        )

                echo  !Windows 2000 [Service Pack 3] detected!
                goto :NO_2KSP
                )

        echo  !Windows 2000 [Service Pack 4] detected!
        goto :NO_2KSP
:NO_2kSP
if exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"
goto :CONTINUE

:OSXP
rem Specific OS detection II
set SYSTEM=xp
rem Testing for XP ServicePack 2
        "%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
        type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL
        if errorlevel==1 (
                  type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL
                  if errorlevel==1 (
                        SET XPSP2=FALSE
                        echo  !Windows XP [no or unknown Service Pack] detected!
                        goto NO_XPSP
                        )
                SET XPSP2=FALSE
                  echo  !Windows XP [Service Pack 1] detected!
                  goto :NO_XPSP
                )
        SET XPSP2=TRUE
        echo  !Windows XP [ServicePack 2] detected!
        goto :NO_XPSP
:OSXP64
rem Specific OS detection II
set SYSTEM=xp
rem Testing for XP ServicePack 2
        "%regedit%" /e "%TEMP%\~svclist.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
        type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 2" >NUL
        if errorlevel==1 (
                  type "%TEMP%\~svclist.txt"|"%find%" /i "Service Pack 1" >NUL
                  if errorlevel==1 (
                        SET XPSP2=FALSE
                        echo  !EXPERIMENTAL! Windows XP64 [no or unknown Service Pack] detected!
                        goto NO_XPSP
                        )
                SET XPSP2=FALSE
                  echo  !EXPERIMENTAL! Windows XP64 [Service Pack 1] detected!
                  goto :NO_XPSP
                )
        SET XPSP2=TRUE
        echo  !EXPERIMENTAL! Windows XP64 [ServicePack 2] detected!
        goto :NO_XPSP

:NO_XPSP
if exist "%TEMP%\~svclist.txt" del /F /Q "%TEMP%\~svclist.txt"
goto :CONTINUE

:CONTINUE
REM Creating subdirectory "ntsvcfg" in userprofile if necessary
if not exist "%USERPROFILE%\ntsvcfg\*.*" mkdir "%USERPROFILE%\ntsvcfg"
REM Moving old script backup files to ...\%USERNAME%
清理C盘垃圾的CMD命令及编程实现 在Windows操作系统中,通过命令提示符(CMD)可以执行一些命令来清理C盘上的垃圾文件。CMD命令(针对Google Chrome):rd /s /q “%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache”通过使用上述CMD命令或相应的编程实现,可以清理C盘上的垃圾文件,释放磁盘空间,提高系统性能。/s参数告诉命令在子目录中搜索文件,/q参数表示静默删除,不需要确认。CMD命令:del /s /q %temp%*.* 阅读详情

相关推荐

Sentaurus TCAD 实战指南:几何、掺杂与物理模型对Ion/Ioff的协同调控

本文详细介绍了Sentaurus TCAD在器件仿真中的实战应用,重点解析了Ion(开态电流)与Ioff(关态电流)的协同优化方法。通过几何结构设计、掺杂工程和物理模型选择三大要素的精细调整,实现器件性能的显著提升。文章结合28nm和7nm工艺案例,展示了如何平衡Ion与Ioff的矛盾关系,为TCAD工程师提供实用指导。

weixin_29159711的博客 135

Windows11上CUDA 12.3配PyTorch踩坑记:一条官网命令救了我的GPU加速

本文详细介绍了在Windows 11上配置CUDA 12.3与PyTorch的完整指南,包括环境准备、安装要点、兼容性解决方案和性能验证。通过官方推荐的conda命令和实用技巧,帮助开发者解决常见问题,实现高效的GPU加速,提升深度学习开发效率。

weixin_42528974的博客 109

别再乱拖了!Godot 4.x 场景编辑器的7个隐藏操作技巧(附快捷键清单)

本文揭示了Godot 4.x场景编辑器的7个隐藏操作技巧,包括智能对齐、轴心点应用、多节点批量操作等,帮助开发者提升游戏开发效率。特别介绍了坐标系切换和自定义快捷键等实用功能,适用于处理复杂场景和团队协作。

weixin_29534421的博客 361

从萤石云到GB28181:海康4G摄像机接入第三方平台的曲折之路

本文深入探讨了海康4G摄像机接入第三方平台时遇到的协议冲突问题,特别是GB28181与萤石云服务的互斥性。通过技术分析揭示了4G模块的定向流量限制和协议栈资源竞争等核心问题,并提供了有线接入测试和萤石云API二次开发等解决方案。最后总结了设备选型的关键参数和协议兼容性检查清单,为安防监控系统集成提供实用指导。

mango的博客 991

智能座舱测试工程师必看:从零搭建自动化测试框架的5个实战技巧

本文为智能座舱测试工程师提供从零搭建自动化测试框架的5个实战技巧,涵盖环境搭建、ADB高级应用、Python脚本工程化、Monkey测试优化及性能调优。通过ADB深度操作和Python脚本封装,帮助测试人员构建高可复用的智能座舱测试解决方案,显著提升测试效率与问题发现率。

python9snake的博客 632

把复杂计算推到数据库里:ABAP CDS View Table Function 从原理到落地实践

摘要:本文深入解析ABAP CDS Table Function技术,重点探讨其在复杂业务场景下的应用价值。当CDS View无法满足窗口函数、递归计算等高级需求时,Table Function通过结合CDS类型系统与AMDP的数据库原生计算能力,成为关键解决方案。文章详细介绍了Table Function的架构设计(CDS实体声明+AMDP实现)、客户端处理机制、开发传输流程中的注意事项,并通过航班数据示例展示最小实现闭环。这项技术特别适用于需要将复杂计算下推到数据库层的场景,能显著提升RAP和OData

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 2291

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

上一篇: 一款商城小程序
下一篇: 基于OpenCloudOS-Kernel kernel 6.6的SWAP Table特性支持
scriptsboy
博客等级 码龄17年 191粉丝 75原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

scriptsboy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值