In an ext3 root file system, there is a temporary file in it.
$ sudo rm -f .rc.local.swp
rm: cannot remove ‘.rc.local.swp’: Input/output error
Also reported an error when ls:
$ ls -la
ls: cannot access .rc.local.swp: Input/output error
total 11
drwxr-xr-x 3 root root 1024 Sep 12 23:20 .
drwxrwxr-x 18 charles charles 1024 Sep 8 01:05 ..
-rw-r--r-- 1 root root 980 Jan 2 2014 bootchartd.conf
-rw-r--r-- 1 root root 293 Sep 12 23:15 fstab
-rw-r--r-- 1 root root 44 Dec 16 2013 group
drwxr-xr-x 2 root root 1024 Sep 12 23:05 init.d
-rw-r--r-- 1 root root 153 Dec 16 2013 inittab
-rw-r--r-- 1 root root 118 Dec 16 2013 passwd
-rw-r--r-- 1 root root 128 Dec 22 2013 profile
-rwxr-xr-x 1 root root 502 Sep 12 23:20 rc.local
-????????? ?? ? ? ?.rc.local.swp
The solution is to fix the file system using FSCK:
$ fsck.ext3 rootfs.img
e2fsck 1.42.9 (4-Feb-2014)
rootfs.img contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Entry '.rc.local.swp' in /etc (119889) has deleted/unused inode 119892. Clear<y>?yes
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -7170 -(485381--485388) -(488452--488455)
Fix<y>?yes
Free blocks count wrong for group #0 (7655, counted=7656).
Fix<y>?yes
Free blocks count wrong for group #59 (7896, counted=7908).
Fix<y>?yes
Free blocks count wrong (438258, counted=438271).
Fix<y>?yes
Inode bitmap differences: -119892
Fix<y>?yes
Free inodes count wrong for group #59 (2020, counted=2021).
Fix<y>?yes
Free inodes count wrong (127446, counted=127447).
Fix<y>?yes
rootfs.img: ***** FILE SYSTEM WAS MODIFIED *****
rootfs.img: 569/128016 files (2.6% non-contiguous), 73729/512000 blocks
Later, remount the filesystem and discover that the file has been deleted.
Read More:
- Elmentui form. When setting input type = number, remove the up and down arrows
- Float: 99: input / output error appears in vscode SSH plug-in
- Busybox encountered input/output error while mounting NFS to TMP file system
- When the permission question mark appears in the sshfs mount, or input / output error occurs
- Linux execution LS error: LS: cannot open directory.: input / output error solution
- (20200912Solved) nohup: ignoring input and appending output to ‘nohup.out‘
- Nohup command in Linux: nohup: assigning input and attaching output to‘ nohup.out ’
- Python3 reports an error [errno 5] input / output error. Print is used when there is no stdout
- Vue element El input search to achieve anti shake @ input event requests frequently
- How to restrict input field to only input pure numbers in HTML
- Assertion `input_val >= zero && input_val <= one` failed
- Lua — using remove to delete table data
- os.remove (file) error windowserror: [error 32]
- Git – remove and trace files
- Remove hijacking of chilltab under MacOS
- Android monitor EditText text input EditText monitor events and input events
- WordPress: How to Remove the directory name in the link
- Prompt 550 remove directory operation failed when FTP delete folder
- Remove array duplicate elements
- Three methods of how to remove the flashback of running result box in VS