Interviewer: Lets say there is a partition of 100GB. When i
tried to create a file using touch command, under any
directory, it was unable to create the file- '100% full
disk space'. I calculated the size of each and every
directory on that partition mannually by adding each file
size & in came out to be total size 50GB. Then where is the
remaining 50GB ? why it is showing disk space 100% full
in 'df -h' command?

Answers were Sorted based on User's Feedback



Interviewer: Lets say there is a partition of 100GB. When i tried to create a file using touch com..

Answer / kenji

One possibility is that there are many small size files. "Small" is relative to block size. For example the block size of ext3 file system is 4096. A file size of 4097 uses 2 blocks resulting 50% efficiency. This can explain why 100G partition gets disk full at 50G usage.

Another possibility is there are processes having large open files which are not linked. Such files are not visible by 'ls' commands but their usage still shows up by df -h.

At the event of 'disk full' I would check inode usage as well. Normally max inodes were allocated as "partition size / block size" so insufficient inodes rarely happens. typing 'df -i' doesn't cost you much :-)
I initially thought of "inode full" which you can check by df -i

Is This Answer Correct ?    6 Yes 1 No

Interviewer: Lets say there is a partition of 100GB. When i tried to create a file using touch com..

Answer / kenji

I guess "inode checking" part I posted was extraneous and not really true for today's large disk.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Unix General Interview Questions

Explain Sticky bit?

0 Answers  


What is unix orphan process?

0 Answers  


Is mac unix based?

0 Answers  


How many root directories exist in unix?

0 Answers  


How do I find the port number of pid in unix?

0 Answers  






How to get the nth word of a line in Unix?

0 Answers  


What will be the result if we run the command #find /tmp - mtime -2 and #find /tmp -mtime +2

6 Answers   Steria,


I have one flat file,in this file how many columns are there i don't know,but one ename column is there , just i want to cut the surname, so how to cut the surname, any one know the answer please guide me ? ename ----- tapan kumar nayak bala murugan kutal chkrobarthy biswo My output is like that OUTPUT ------ nayak murugan chakrobarthy biswo

0 Answers   Cap Gemini,


Explain a path in unix.

0 Answers  


Does apple run unix?

0 Answers  


What will happens when we don't call of bind()and listen() in a normal echo server ? Q.33 (b). What are the purposes of the three file descriptors on which the syslogd daemon listens and does I/O multiplexing?

1 Answers  


What is unix kernel?

0 Answers  


Categories