Linux - shivamvats/notes GitHub Wiki

Inode

An inode is a data-structure on a file-system on Linux that stores all the (meta-data) information about a file except its name and the actual data. When a file is created, it is assigned both a name and an inode that is unique. A file is essentially a name + pointer to an inode.

Hard links vs Soft links

When a hard link to a file is created, the new file gets a pointer to the inode of the original file. Both the files are equivalent as they have pointers to the same inode. The inode (and hence the "data") gets deleted only when both the link are.

A symbolic link, on the other hand is a link to the original file. Hence, it becomes a dangling pointer if the original file is deleted.

Code-Profiling

Use gperftools-profiler for profiling C++ code.

⚠️ **GitHub.com Fallback** ⚠️