如何从 Ubuntu 删除 Windows 文件?

如何从 Ubuntu 删除 Windows 文件?

操作系统:17.10 和 Win10。

我正在双启动 Windows 和 Ubuntu。我可以从我的 Windows 分区读取和执行所有文件。但我无法从 Thunar 中删除它们。我以 sudo 身份运行并得到了相同的结果。

它们都位于同一个硬盘上,但显然已分区。有什么方法可以从 Ubuntu 中删除 Windows 文件吗,还是必须登录 Windows 才能执行此操作?我不关心系统安全,我正在努力减少文件数量,以便最终可以完全删除 Windows 分区。

编辑:Windows 已挂载。当我卸载它时,我无法读取或执行文件,更不用说删除它们了。

编辑#2:当尝试从命令行删除时,出现以下错误:

rm: cannot remove 'file.exe': Read-only file system

运行该命令时mount,我收到很多输出:

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3993752k,nr_inodes=998438,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=804052k,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13322)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/var/lib/snapd/snaps/mailspring_86.snap on /snap/mailspring/86 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/atom_109.snap on /snap/atom/109 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/mailspring_77.snap on /snap/mailspring/77 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/brackets_21.snap on /snap/brackets/21 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/hugo_1012.snap on /snap/hugo/1012 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/core_3604.snap on /snap/core/3604 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/core_3440.snap on /snap/core/3440 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/vscode_21.snap on /snap/vscode/21 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/brackets_46.snap on /snap/brackets/46 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/mailspring_96.snap on /snap/mailspring/96 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/atom_76.snap on /snap/atom/76 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/atom_106.snap on /snap/atom/106 type squashfs (ro,nodev,relatime)
/var/lib/snapd/snaps/vscode_20.snap on /snap/vscode/20 type squashfs (ro,nodev,relatime)
/dev/sda2 on /media/radhika/System type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sda3 on /media/radhika/Windows type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=804048k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/fuse on /run/user/1000/doc type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/var/lib/snapd/snaps/vscode_22.snap on /snap/vscode/22 type squashfs (ro,nodev,relatime)

我尝试获取 /etc/fstab 的输出,系统说该文件夹不存在。

答案1

打开终端类型sudo mount -o remount,rw /disk/location /mount/location

您刚刚卸载并重新安装磁盘为 R/W,因此任何人都可以读写。sudo umount /disk/location完成后请务必执行此操作,因为如果有人想造成损害,他们现在就可以写入磁盘!

尝试lsblk您的磁盘位置,当您想要重新生成 fstab 时,只需重新启动。

相关内容