Loading color scheme

[Python, C] Simple program to normalize path in Linux

In Linux systems, a common way to normalize a file path means converting a potentially relative path or a path with symbolic links, dot-segments (. or ..) to an absolute path, resolving any symbolic links and eliminating any dot-segments. Below is a simple Python script to normalize a file path in Linux.

Read more
Understanding Windows Sparse Files

Sparse files constitute a fascinating feature in the Windows operating system, offering a clever way to utilize storage space more efficiently. These files essentially permit the creation of files that have "empty" or unused parts, which do not consume disk space. The operating system achieves this by merely keeping track of the non-empty sections and their respective data, resulting in the storage of considerably large files with significantly reduced physical disk usage.

Let’s dive deeper into understanding sparse files. Typically, when a file is created and data is written to it, every byte, whether containing meaningful data or not, consumes disk space. In contrast, sparse files only allocate space for the data that is explicitly written, while not using any space for the bytes that are not written. Unwritten sections, often zeros or null bytes, are considered "sparse" and do not consume any actual disk space. Instead, the filesystem maintains metadata to keep track of which sections of the file are sparse and which contain actual data.

Read more
Get all interesting articles to your inbox
Please wait