What should I do if the U disk file is read-only on Ubuntu and cannot be deleted?

  

When the Ubuntu system reads the USB flash drive, it finds that the files in the USB flash drive cannot be deleted and the display is read-only. How do you change the files to read? The following small series will introduce you to the Ubuntu system U disk file can not be deleted.

Solution:

1. Run the following commands

tail -f /var /log /syslog

in the terminal 2. Insert Ubuntu U disk with read-only file system failure

3. Observe the command line output

The output is as follows:

Jul 8 16:44:50 cslouis-pc kernel: [ 15595.155904] FAT: Filesystem error (dev sdb4)

Jul 8 16:44:50 cslouis-pc kernel: [15595.155905] fat_get_cluster: invalid cluster chain (i_pos 0)

Seen from above The file system mounted on the USB flash drive is /dev/sdb4, and the file system is faulty (FAT: Filesystem error)

4. Enter the following command:

umount /media/ZCF(ZCF Is your U disk name, you can use ls in the media directory to view)

5. Fix U disk file system failure

sudo dosfsck -v -a /dev/sdb4

After the above 5 steps, the U disk can resume reading and writing.

The above is the introduction of the Ubuntu system U disk file can not be deleted, according to the method of this article, the U disk file can be read and deleted to delete the file.

Copyright © Windows knowledge All Rights Reserved