确定分区创建日期并删除一个分区

确定分区创建日期并删除一个分区

我正在尝试重新利用一台旧笔记本电脑。它有两个 Ubuntu 分区。我只需要一个,那么我如何确定机器上实际正在使用哪一个?然后,额外的空间将用于扩展剩余的分区,并希望也能提高机器的性能。Gparted 没有给我所需的信息。作为推论:删除其中一个真的安全吗?

编辑:我不知道在(比如说)更新邮件或 fs 时写入的是哪个。我的猜测是,如果我能找到最近更新的那个,那就是**不**要删除的那个。

parted 给出:


Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  538MB   537MB   fat32                 boot, esp
 2      538MB   333GB   333GB   ext4
 4      507GB   992GB   485GB   ext4
 3      992GB   1000GB  7724MB  linux-swap(v1)        swap

def - h 给出:


Filesystem      Size  Used Avail Use% Mounted on
udev            3.5G     0  3.5G   0% /dev
tmpfs           715M  2.1M  713M   1% /run
/dev/sda4       445G   72G  351G  17% /
tmpfs           3.5G  960K  3.5G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.5G     0  3.5G   0% /sys/fs/cgroup
/dev/loop3       56M   56M     0 100% /snap/core18/2066
/dev/loop5      7.2M  7.2M     0 100% /snap/foobar2000/310
/dev/loop4      128K  128K     0 100% /snap/acrordrdc/8
/dev/loop0       56M   56M     0 100% /snap/core18/2074
/dev/loop7       56M   56M     0 100% /snap/core18/1885
/dev/loop6       98M   98M     0 100% /snap/core/10185
/dev/loop1       98M   98M     0 100% /snap/core/10126
/dev/loop2      9.2M  9.2M     0 100% /snap/canonical-livepatch/95
/dev/loop10     7.3M  7.3M     0 100% /snap/foobar2000/313
/dev/loop9      9.2M  9.2M     0 100% /snap/canonical-livepatch/94
/dev/loop8      162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop11     163M  163M     0 100% /snap/gnome-3-28-1804/145
/dev/loop12     219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop13     2.5M  2.5M     0 100% /snap/gnome-calculator/826
/dev/loop14     2.5M  2.5M     0 100% /snap/gnome-calculator/748
/dev/loop16     6.7M  6.7M     0 100% /snap/gnome-clocks/257
/dev/loop15     219M  219M     0 100% /snap/gnome-3-34-1804/66
/dev/loop19     384K  384K     0 100% /snap/gnome-characters/570
/dev/loop17     1.0M  1.0M     0 100% /snap/gnome-logs/100
/dev/loop20     6.4M  6.4M     0 100% /snap/gnome-clocks/261
/dev/loop18     256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop21     384K  384K     0 100% /snap/gnome-characters/550
/dev/loop23     2.3M  2.3M     0 100% /snap/gnome-system-monitor/145
/dev/loop22     1.0M  1.0M     0 100% /snap/gnome-logs/93
/dev/loop24     2.3M  2.3M     0 100% /snap/gnome-system-monitor/148
/dev/loop27      66M   66M     0 100% /snap/gtk-common-themes/1515
/dev/loop25      55M   55M     0 100% /snap/gtk-common-themes/1502
/dev/loop26      65M   65M     0 100% /snap/gtk-common-themes/1514
/dev/loop28      52M   52M     0 100% /snap/snap-store/518
/dev/loop29      51M   51M     0 100% /snap/snap-store/547
/dev/loop30      33M   33M     0 100% /snap/snapd/12159
/dev/loop31      33M   33M     0 100% /snap/snapd/12398
/dev/loop33     457M  457M     0 100% /snap/wine-platform/125
/dev/loop34      74M   74M     0 100% /snap/wine-platform-3-stable/6
/dev/loop32     457M  457M     0 100% /snap/wine-platform/122
/dev/loop36     216M  216M     0 100% /snap/wine-platform-5-stable/10
/dev/loop35     457M  457M     0 100% /snap/wine-platform/128
/dev/loop38     227M  227M     0 100% /snap/wine-platform-runtime/145
/dev/loop39     232M  232M     0 100% /snap/wine-platform-runtime/179
/dev/loop37     215M  215M     0 100% /snap/wine-platform-5-stable/5
/dev/sda2       306G  3.2G  287G   2% /datadisk
/dev/sda1       511M  7.9M  504M   2% /boot/efi
tmpfs           715M   56K  715M   1% /run/user/1000
/dev/sdb1       115G   67G   48G  59% /media/peter/F232-AE96

答案1

打开磁盘 -> 选择您的磁盘 -> 查找'基本的' 关键字。这将告诉您主分区是什么。

看这张图片

大多数情况下是这样的/dev/sda2。卸载整个磁盘后,您可以调整分区大小。要增加分区大小,您需要磁盘中有可用空间。

要了解特定分区的创建日期,请运行此代码:-

sudo dumpe2fs /dev/sda2 | grep create

/dev/sda2是您的分区设备的名称。

要卸载,您可以sudo unmount -v '/'使用/是您的目标位置。

相关内容