1

I am trying to delete some regular files in my machine (external hard-disk). It will throw the below errors,

rm: cannot remove 'Personal/Mobile': Input/output error 
rm: cannot remove 'Personal/mygarrage': Input/output error 
rm: cannot remove 'Personal/Photos': Input/output error 
rm: cannot remove 'Personal/typewriting': Input/output error

The actual file permissions looks,

ubuntu@ubuntu:$ ls -ltr
ls: cannot access 'Mobile': Input/output error
ls: cannot access 'mygarrage': Input/output error
ls: cannot access 'Photos': Input/output error
ls: cannot access 'typewriting': Input/output error
total 4
d????????? ? ?      ?         ?            ? typewriting
d????????? ? ?      ?         ?            ? Photos
d????????? ? ?      ?         ?            ? mygarrage
d????????? ? ?      ?         ?            ? Mobile

What is the problem of this? Is there any way to delete this files?

File system info:

Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  7.8G     0  7.8G   0% /dev
tmpfs          tmpfs     1.6G   18M  1.6G   2% /run
/dev/sdb       iso9660   1.4G  1.4G     0 100% /cdrom
/dev/loop0     squashfs  1.4G  1.4G     0 100% /rofs
/cow           overlay   7.8G  2.1G  5.8G  26% /
tmpfs          tmpfs     7.8G  344K  7.8G   1% /dev/shm
tmpfs          tmpfs     5.0M  8.0K  5.0M   1% /run/lock
tmpfs          tmpfs     7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs          tmpfs     7.8G  932K  7.8G   1% /tmp
tmpfs          tmpfs     1.6G   84K  1.6G   1% /run/user/999
/dev/sda7      ext4      379G  229G  131G  64% /media/ubuntu/1c328b87-efa9-48d7-b98a-a28809d7a7c6
/dev/sdd1      fuseblk   932G  440G  492G  48% /media/ubuntu/SeagateBackupPlusDrive
sprabhakaran
  • 201
  • 1
  • 3
  • 11

2 Answers2

2

Try to repair the file system

Depending on file system, there are different ways that you can try to repair it according to this link:

Repair the partition table and file system of a pendrive.

S.M.A.R.T. information

You should also check the 'hardware health', the S.M.A.R.T. information according to the following link:

S.M.A.R.T. information of HDD and SSD

sudodus
  • 46,324
  • 5
  • 88
  • 152
0

Read about mount/umount

In my case directory had be unmount, to be deleted itself or its subdirectories/files

sudo umount -f /media/sami/OS\ WIN7

Then simply sudo rm -rf sami/OS\ WIN7 worked for me

Sami
  • 236
  • 2
  • 7