0
0
Linux CLIscripting~5 mins

Inodes concept in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an inode in a Linux file system?
An inode is a data structure that stores information about a file except its name and actual data. It holds metadata like file size, permissions, owner, and pointers to data blocks.
Click to reveal answer
beginner
Which command shows the inode number of files in a directory?
The command ls -i lists files with their inode numbers.
Click to reveal answer
intermediate
How does the inode relate to the file name?
The inode does not store the file name. The file name is stored in the directory entry that points to the inode number.
Click to reveal answer
intermediate
What happens if two file names point to the same inode?
They are called hard links. Both names refer to the same file data and metadata. Changes to one affect the other.
Click to reveal answer
advanced
Why can a file still exist if its name is deleted but the inode is not?
Because the inode keeps track of how many links point to it. If the link count is not zero, the file data remains until all links are removed.
Click to reveal answer
What does an inode NOT store?
AFile size
BFile name
CFile permissions
DPointers to data blocks
Which command shows inode numbers alongside file names?
Adf
Bls -l
Cls -i
Dstat
What is a hard link in terms of inodes?
AA file stored in a different directory
BA symbolic shortcut to a file
CA backup copy of a file
DTwo file names pointing to the same inode
If a file's name is deleted but the inode link count is not zero, what happens?
AThe file data remains accessible via other links
BThe file data is immediately deleted
CThe inode number changes
DThe file is moved to trash
Where is the file name stored in a Linux file system?
AIn the directory entry
BInside the inode
CIn the data blocks
DIn the superblock
Explain what an inode is and what information it contains.
Think about what details a file system needs to manage files besides their names.
You got /6 concepts.
    Describe the relationship between file names, inodes, and hard links.
    Consider how files can have more than one name pointing to the same data.
    You got /4 concepts.