Q15
What happens when file is deleted in Linux?
💬Answer
- The directory entry linking the filename to its Inode number is removed.
- The inode's hard link count is decremented by 1.
- If the link count reaches 0 and no running process holds an open file descriptor to the file, the block addresses are marked as free in the filesystem allocation bitmap.
- The actual data remains on disk until overwritten by new file writes.
Related Linux Questions
View All LinuxQuestions →Q1
Explain what Linux is and why it is widely used in DevOps environments.
Q2What is the Linux kernel and what role does it play in the operating system?
Q3Explain the Linux filesystem hierarchy and the purpose of /etc, /var, /home, /tmp, and /usr.
Q4What happens internally when you run the `ls` command in Linux?

Created by
Apurv Gujjar
DevOps & Cloud Engineer
Specialized in:DevOpsAWSGCPKubernetesTerraformDocker
View Portfolio