Linux : Cannot Access …. Input/output error

/bin/ls: reading directory .: Input/output error
total 0

The above error indicate that i cannot access to the specific file on Linux, Delete not working. with root user as well.
so the error is not a problem to delete files, it’s a problem about the file system itself and/or an hardware problem, but before announce that it’s hardware issue 🙂 try the below solution :-

 Option #1:-

use command dmesg.

(display message or driver message) is a command on most Linux- and Unix-based operating systems that prints the message buffer of the kernel. Read about that command here

Option #2 ( worked for me)

Use Fsck command to detect filesystem error and fix it.

How !!!

  1.  First Umount File system ( that file located ). Using Umount command if it’s not able to un mount the file system use lsof command or fuser to check which user using this filesystem.
  2. run the fsck -y /dev/…………….. 
  3. mount file system again.
Fsck Command here
Osama …

RunLevel Mode In Linux

As Database administrator you dealing with Different operating system everyday, most of this operating system is Linux/Unix, During the boot up for Linux the init command open files called “/etc/initab”  this file linux start decide which run level the system should booted to. After start the OS you can check “/etc/initab” using Editor (vim command).

there’s different type of run level in linux you should know about them :

  • 0 – halt (Do NOT set initdefault to this).
  • 1 – Single user mode.
  • 2 – Multiuser, without NFS (The same as 3, if you do not have networking).
  • 3 – Full multiuser mode.
  • 4 – unused.
  • 5 – X11.
  • 6 – reboot (Do NOT set initdefault to this).

The Above modes available in /etc/initaband you can check them, when you open the files you will see lines


 Which indicate for default level. and you can change it.

Short Description for the RunLevels :

Runlevel 0:

Cause the system shutdown , and you can’t set this as default. no reason to do that.

RunLevel 1:

in this Level System start in something called Single User Mode which mean root user only who can log in to the system.and notice there’s no networking in this mode it will be useful for repair and maintenance.

RunLevel 2:

The System Will log in to mutli user mode which mean you can log in to any users but without networking .

RunLevel 3:

Its same as Runlevel 2 but with networking, This level is common for most linux.

RunLevel 4:

Custom Level, or Custom Boot Level ( Undefined one).

RunLevel 5:

Networking, Multi user Mode With X window Which mean when the OS end of boot the GUI screen will appear to users “Welcome Screen” and can log in, this is what you see in the Linux For example Redhat.

RunLevel 6:

Reboot your Operating System, Sure you don’t want to set this to default.

you can use any runlevel by command –> init ‘run-level-number’

Thank you
Osama Mustafa

Another Linux Command

1-Check Memory :

[oracle@192 ~]$ free -m

             total       used       free     shared    buffers     cached
Mem:          1010        997         13          0         71        685
-/+ buffers/cache:        240        770
Swap:         2000          0       2000

[oracle@192 ~]$ vmstat

procs ———–memory———- —swap– —–io—- –system– —–cpu——
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0  28820  72248 704336    0    0   117    49 1026  239  3  1 93  3  0

[oracle@192 ~]$ dmesg | grep RAM

BIOS-provided physical RAM map:
hdc: ATAPI 1X DVD-ROM DVD-R-RAM CD-R/RW drive, 32kB Cache, UDMA(33)

Finally : top command that you could use.

2-How Much this Os was running
[oracle@192 ~]$ uptime

 23:03:17 up  1:44,  2 users,  load average: 0.04, 0.11, 0.08

3-Check Some Hardware Information


[oracle@192 ~]$ cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
stepping        : 2
cpu MHz         : 2261.079
cache size      : 3072 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx rdtscp lm constant_tsc up ida nonstop_tsc pni cx16 popcnt lahf_lm [8]
bogomips        : 4522.15

 Thank you
Osama mustafa