AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-999650

jms's questions

Martin Hope
jms
Asked: 2023-10-12 06:52:00 +0800 CST

系统驱动器 (1TB) 已满 82%?所有“我的”文件都位于单独的硬盘上

  • 8

这是一个桌面系统,配有用于操作系统 Xubuntu 20.04.6 的 1TB SSD,以及用于存储我所有文件的多个 HDD。所以操作系统不应该占用那么多空间。但 df 的输出是:

Filesystem      1K-blocks       Used  Available Use% Mounted on 
udev             16332704          0   16332704   0% /dev
tmpfs             3284264       3384    3280880   1% /run
/dev/nvme0n1p2  959786032  740380052  170577772  82% /

显然,还有更多行,但 /dev/nvme 行是问题所在。我一辈子都找不到是什么占据了所有的空间。“home”文件夹大约有 6GB。

我对“proc”目录表示怀疑。Nautilus 称其拥有数万个文件,总计 128TB。我想不是。这是 cd /proc 的输出;须藤杜-hs

du: cannot read directory './3032/task/3032/net': Invalid argument
du: cannot read directory './3032/net': Invalid argument
du: cannot read directory './3288/task/3288/net': Invalid argument
du: cannot read directory './3288/net': Invalid argument
du: cannot access './6606/task/6606/fd/3': No such file or directory
du: cannot access './6606/task/6606/fdinfo/3': No such file or directory
du: cannot access './6606/fd/4': No such file or directory
du: cannot access './6606/fdinfo/4': No such file or directory
0

我在“/”下的所有其他目录上使用了“du -hs”,它们加起来约为 55GB。还有一个 2GB 的交换文件。那么我如何找到什么东西耗尽了我所有的 SSD 空间呢?

更新:这是输出cd / ; sudo du -hxd 1

j@puter:/$ cd / ; sudo du -hxd 1
11M ./root
18M ./bin
20M ./sbin
4.0K    ./mnt
5.4G    ./usr
16K ./lost+found
184K    ./tmp
532M    ./opt
248M    ./boot
84K ./snap
12G ./var
6.4G    ./home
4.0K    ./lib64
8.0K    ./srv
1.5G    ./lib
4.0K    ./cdrom
14M ./etc
8.0K    ./media
28G .
j@puter:/$ 

更新:从实时 USB 启动,运行 fsck

xubuntu@xubuntu:~$ sudo fsck -f /dev/nvme0n1p2
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Inode 34099073 extent tree (at level 1) could be narrower.  Optimize<y>? yes
Inode 34344578 extent tree (at level 1) could be shorter.  Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/nvme0n1p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/nvme0n1p2: 514456/61022208 files (4.6% non-contiguous), 189197520/244059136 blocks
xubuntu@xubuntu:~$ 

更新: ncdu证实了du我所说的:

Total disk usage:  27.4 GiB  Apparent size:  27.2 GiB  Items: 402910

当我查看 GUI 中的“属性”时,它说

401685 items, totalling 26.1 GiB (28,044,956,192 bytes)
(some contents unreadable)
162.7 GiB of 915.3 GiB free (82% used)
disk-usage
  • 3 个回答
  • 224 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve