<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged files</title>
<link>https://coderlegion.com/tag/files</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to Configure Nginx as a Proxy Server?</title>
<link>https://coderlegion.com/16116/how-to-configure-nginx-as-a-proxy-server</link>
<description>
&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In previous article we could able to server simple html page.&lt;/p&gt;

&lt;p&gt;Now lets see how to use nginx as a proxy server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up a Simple Proxy Server
&lt;/h2&gt;

&lt;p&gt;One of the frequent uses of nginx is setting it up as a proxy server, which means a server that receives requests, passes them to the proxied servers, retrieves responses from them, and sends them to the clients.&lt;/p&gt;

&lt;p&gt;We will configure a basic proxy server, which serves requests on behalf of another server running in port 8080. &lt;/p&gt;

&lt;p&gt;Here is example of how to configure it.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight conf&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# This is a comment in the Main Context
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;worker_processes&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;; 

&lt;span class=&quot;n&quot;&gt;events&lt;/span&gt; { 
    &lt;span class=&quot;c&quot;&gt;# This is a simple directive inside the 'events' context
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;worker_connections&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1024&lt;/span&gt;; 
}

&lt;span class=&quot;n&quot;&gt;http&lt;/span&gt; { 
    &lt;span class=&quot;c&quot;&gt;# We are now inside the 'http' context
&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;server&lt;/span&gt; { 
        &lt;span class=&quot;n&quot;&gt;location&lt;/span&gt; / {
            &lt;span class=&quot;n&quot;&gt;proxy_pass&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http&lt;/span&gt;://&lt;span class=&quot;n&quot;&gt;localhost&lt;/span&gt;:&lt;span class=&quot;m&quot;&gt;8080&lt;/span&gt;; &lt;span class=&quot;c&quot;&gt;# Proxies traffic to the backend on 8080
&lt;/span&gt;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will be a simple server that listens on the port 8080.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Static Files For Existing Proxy Server
&lt;/h2&gt;

&lt;p&gt;let's assume we have a static files in &lt;code&gt;/var/www/html&lt;/code&gt; directory and we want to server another application running on port 8080.&lt;/p&gt;

&lt;p&gt;so, we can configure both these in nginx it self.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight nginx&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# This is a comment in the Main Context&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;worker_processes&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 

&lt;span class=&quot;k&quot;&gt;events&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;# This is a simple directive inside the 'events' context&lt;/span&gt;
    &lt;span class=&quot;kn&quot;&gt;worker_connections&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1024&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;http&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
    &lt;span class=&quot;c1&quot;&gt;# We are now inside the 'http' context&lt;/span&gt;

    &lt;span class=&quot;kn&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
        &lt;span class=&quot;kn&quot;&gt;location&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kn&quot;&gt;proxy_pass&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;http://localhost:8080&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# Proxies traffic to the backend on 8080&lt;/span&gt;

        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;kn&quot;&gt;location&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/static/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kn&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/var/www/html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# Serves static files from /var/www/html&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way we will be able to serve both static files and other server running in port 8080.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We could able to setup simple proxy server and serve both static files and other server running on different port.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabn6nl3iehrohehnxgje.png&quot; alt=&quot;git-lrc&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It&amp;rsquo;s online, source-available, and ready for anyone to use. &lt;br&gt;
&amp;#11088; Star it on GitHub: &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;


</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/16116/how-to-configure-nginx-as-a-proxy-server</guid>
<pubDate>Fri, 01 May 2026 11:10:59 +0000</pubDate>
</item>
<item>
<title>How Files Are Stored, Deleted, and Copied Inside Your Computer</title>
<link>https://coderlegion.com/14656/how-files-are-stored-deleted-and-copied-inside-your-computer</link>
<description>
&lt;p&gt;&lt;img src=&quot;https://blog.ratnesh-maurya.com/images/blog/How-Files-Are-Stored-Deleted-and-Copied-Inside-Your-Computer.jpg&quot; alt=&quot;How Files Are Stored, Deleted, and Copied Inside Your Computer&quot;&gt;&lt;/p&gt;&lt;h1 id=&quot;how-files-are-stored-deleted-and-copied-inside-your-computer&quot;&gt;How Files Are Stored, Deleted, and Copied Inside Your Computer&lt;/h1&gt;
&lt;p&gt;Have you ever noticed something interesting?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deleting a file happens instantly.&lt;/li&gt;
&lt;li&gt;Copying a file takes time.&lt;/li&gt;
&lt;li&gt;Moving a file is sometimes instant and sometimes slow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why does this happen?&lt;/p&gt;
&lt;p&gt;If you're new to operating systems and storage internals, this article explains everything in simple terms using real-world analogies, while also giving you a deeper technical understanding of what&amp;rsquo;s happening behind the scenes.&lt;/p&gt;
&lt;p&gt;By the end, you&amp;rsquo;ll understand:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How files are stored on disk&lt;/li&gt;
&lt;li&gt;Why delete is fast&lt;/li&gt;
&lt;li&gt;Why copy takes time&lt;/li&gt;
&lt;li&gt;Whether files are really deleted&lt;/li&gt;
&lt;li&gt;How HDD and SSD behave differently&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;how-files-are-actually-stored-on-disk&quot;&gt;How Files Are Actually Stored on Disk&lt;/h2&gt;
&lt;p&gt;Your computer does not store files the way you see them in folders.&lt;/p&gt;
&lt;p&gt;Internally, storage is divided into:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Data Blocks (or clusters)&lt;/strong&gt; &amp;ndash; These contain the actual bytes of your file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metadata&lt;/strong&gt; &amp;ndash; Information about the file:
&lt;ul&gt;
&lt;li&gt;File name&lt;/li&gt;
&lt;li&gt;File size&lt;/li&gt;
&lt;li&gt;Location of data blocks&lt;/li&gt;
&lt;li&gt;Permissions&lt;/li&gt;
&lt;li&gt;Created/modified timestamps&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A file system (like NTFS, ext4, FAT32) manages this structure.&lt;/p&gt;
&lt;h3 id=&quot;example-file-systems&quot;&gt;Example File Systems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Windows &amp;rarr; NTFS&lt;/li&gt;
&lt;li&gt;Linux &amp;rarr; ext4&lt;/li&gt;
&lt;li&gt;USB drives &amp;rarr; FAT32&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each filesystem maintains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A directory entry (file name)&lt;/li&gt;
&lt;li&gt;A metadata record (inode in Linux, MFT entry in NTFS)&lt;/li&gt;
&lt;li&gt;Pointers to the actual disk blocks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can think of it like a database that tracks where your file data lives on disk.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;real-life-analogy-a-library&quot;&gt;Real-Life Analogy: A Library&lt;/h2&gt;
&lt;p&gt;Imagine this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;library catalog&lt;/strong&gt; = filesystem metadata&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;books on shelves&lt;/strong&gt; = actual file data&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;shelf location number&lt;/strong&gt; = pointer to disk blocks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you open a file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The system checks the catalog.&lt;/li&gt;
&lt;li&gt;It finds the shelf location.&lt;/li&gt;
&lt;li&gt;It retrieves the book (data blocks).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now let&amp;rsquo;s see what happens during delete and copy.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;why-deleting-a-file-is-instant&quot;&gt;Why Deleting a File Is Instant&lt;/h2&gt;
&lt;p&gt;When you delete a file, the system usually does &lt;strong&gt;not erase the data immediately&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Instead, it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Removes the file name from the directory.&lt;/li&gt;
&lt;li&gt;Marks its data blocks as &amp;ldquo;free&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Updates metadata records.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;rsquo;s it.&lt;/p&gt;
&lt;p&gt;The actual bytes are still physically on disk &amp;mdash; but the system marks that space as available for reuse.&lt;/p&gt;
&lt;p&gt;Since this is mainly a metadata update, it happens very fast.&lt;/p&gt;
&lt;h3 id=&quot;important-insight&quot;&gt;Important Insight&lt;/h3&gt;
&lt;p&gt;Deleting is like removing the book&amp;rsquo;s entry from the library catalog.&lt;/p&gt;
&lt;p&gt;The book is still on the shelf &amp;mdash; but nobody knows it exists anymore.&lt;/p&gt;
&lt;p&gt;This is why:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;File recovery tools can restore deleted files.&lt;/li&gt;
&lt;li&gt;Secure deletion requires special tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;do-files-actually-get-deleted&quot;&gt;Do Files Actually Get Deleted?&lt;/h2&gt;
&lt;p&gt;Short answer: &lt;strong&gt;Not immediately.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;They are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Marked as free space&lt;/li&gt;
&lt;li&gt;Eventually overwritten by new data&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On SSDs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The operating system sends a &lt;strong&gt;TRIM command&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The SSD later clears unused blocks internally&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deletion is logical first, physical later.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;why-copying-a-file-takes-time&quot;&gt;Why Copying a File Takes Time&lt;/h2&gt;
&lt;p&gt;Copying is completely different.&lt;/p&gt;
&lt;p&gt;When copying:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The system reads every block from the source file.&lt;/li&gt;
&lt;li&gt;Loads it into memory (RAM).&lt;/li&gt;
&lt;li&gt;Writes those blocks to a new location.&lt;/li&gt;
&lt;li&gt;Creates new metadata for the copied file.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This process depends on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Disk speed&lt;/li&gt;
&lt;li&gt;File size&lt;/li&gt;
&lt;li&gt;HDD vs SSD&lt;/li&gt;
&lt;li&gt;CPU and memory performance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since the entire file&amp;rsquo;s data must be read and written, copying takes time.&lt;/p&gt;
&lt;h3 id=&quot;example&quot;&gt;Example&lt;/h3&gt;
&lt;p&gt;Copying a 10GB file means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reading 10GB&lt;/li&gt;
&lt;li&gt;Writing 10GB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s 20GB of total I/O operations.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s real physical work being done.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;why-moving-files-is-sometimes-instant&quot;&gt;Why Moving Files Is Sometimes Instant&lt;/h2&gt;
&lt;p&gt;This depends on where you move the file.&lt;/p&gt;
&lt;h3 id=&quot;case-1-same-drive-same-filesystem&quot;&gt;Case 1: Same Drive (Same Filesystem)&lt;/h3&gt;
&lt;p&gt;Move = metadata update only.&lt;/p&gt;
&lt;p&gt;The system just:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updates the directory entry&lt;/li&gt;
&lt;li&gt;Keeps data blocks unchanged&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is very fast.&lt;/p&gt;
&lt;h3 id=&quot;case-2-different-drive&quot;&gt;Case 2: Different Drive&lt;/h3&gt;
&lt;p&gt;Move becomes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copy the file&lt;/li&gt;
&lt;li&gt;Delete the original&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So it takes time.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s why:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Moving inside C: is instant&lt;/li&gt;
&lt;li&gt;Moving from C: to D: takes time&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;hdd-vs-ssd-behavior&quot;&gt;HDD vs SSD Behavior&lt;/h2&gt;
&lt;h3 id=&quot;hdd-hard-disk-drive&quot;&gt;HDD (Hard Disk Drive)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Mechanical spinning disk&lt;/li&gt;
&lt;li&gt;Moving read/write head&lt;/li&gt;
&lt;li&gt;Slower seek time&lt;/li&gt;
&lt;li&gt;Sequential reads are faster&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Copying large files can be slower because of mechanical movement.&lt;/p&gt;
&lt;h3 id=&quot;ssd-solid-state-drive&quot;&gt;SSD (Solid State Drive)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;No moving parts&lt;/li&gt;
&lt;li&gt;Much faster random access&lt;/li&gt;
&lt;li&gt;Uses flash memory cells&lt;/li&gt;
&lt;li&gt;Uses TRIM and garbage collection&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deletion marks blocks unused first. The physical erase happens later internally.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-happens-in-the-os-layer&quot;&gt;What Happens in the OS Layer&lt;/h2&gt;
&lt;p&gt;At the system-call level (Linux example):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;delete&lt;/code&gt; &amp;rarr; &lt;code&gt;unlink()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;copy&lt;/code&gt; &amp;rarr; multiple &lt;code&gt;read()&lt;/code&gt; and &lt;code&gt;write()&lt;/code&gt; calls&lt;/li&gt;
&lt;li&gt;&lt;code&gt;move (same filesystem)&lt;/code&gt; &amp;rarr; &lt;code&gt;rename()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;hljs language-bash&quot;&gt;strace &lt;span class=&quot;hljs-built_in&quot;&gt;rm&lt;/span&gt; file.txt

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You'll see something like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;unlink(&quot;file.txt&quot;)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That's simply removing the reference to the file.&lt;/p&gt;
&lt;p&gt;Copying involves many &lt;code&gt;read()&lt;/code&gt; and &lt;code&gt;write()&lt;/code&gt; operations, which take time.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;why-deleting-many-files-can-be-slow&quot;&gt;Why Deleting Many Files Can Be Slow&lt;/h2&gt;
&lt;p&gt;Deleting one file is fast.&lt;/p&gt;
&lt;p&gt;Deleting thousands of small files can take time because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Each file has metadata.&lt;/li&gt;
&lt;li&gt;Directory entries must be updated.&lt;/li&gt;
&lt;li&gt;Journaling systems must commit changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even metadata operations add up when repeated many times.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;secure-deletion&quot;&gt;Secure Deletion&lt;/h2&gt;
&lt;p&gt;Normal delete:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Marks space as free&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Secure delete:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overwrites data blocks&lt;/li&gt;
&lt;li&gt;Ensures recovery is impossible&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On SSDs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use drive-level secure erase&lt;/li&gt;
&lt;li&gt;Or enable full-disk encryption&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;key-takeaways&quot;&gt;Key Takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Delete is fast because it removes metadata, not actual data.&lt;/li&gt;
&lt;li&gt;Copy is slow because it transfers real bytes.&lt;/li&gt;
&lt;li&gt;Move is fast only within the same filesystem.&lt;/li&gt;
&lt;li&gt;Deleted files remain until overwritten.&lt;/li&gt;
&lt;li&gt;SSDs and HDDs behave differently.&lt;/li&gt;
&lt;li&gt;Secure deletion requires special handling.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-to-explore-next&quot;&gt;What to explore next&lt;/h2&gt;
&lt;p&gt;File operations look simple from the UI, but under the surface the OS is managing metadata, block allocation, caching, journaling, and hardware coordination.&lt;/p&gt;
&lt;p&gt;If this interested you, here are some rabbit holes worth going down:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;strace&lt;/code&gt; on Linux&lt;/strong&gt; &amp;mdash; run &lt;code&gt;strace rm file.txt&lt;/code&gt; or &lt;code&gt;strace cp src dst&lt;/code&gt; to see the actual system calls involved&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filesystem internals&lt;/strong&gt; &amp;mdash; look into how ext4 journaling works, or how ZFS and Btrfs use copy-on-write to make snapshots nearly free&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flash Translation Layer&lt;/strong&gt; &amp;mdash; how SSDs remap logical blocks to physical NAND pages, and why TRIM exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data recovery tools&lt;/strong&gt; &amp;mdash; tools like &lt;code&gt;testdisk&lt;/code&gt; and &lt;code&gt;photorec&lt;/code&gt; exploit the fact that &quot;deleted&quot; data is still on disk&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The next time a file deletes instantly, you'll know &amp;mdash; it wasn't magic. It was just a metadata update.&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/14656/how-files-are-stored-deleted-and-copied-inside-your-computer</guid>
<pubDate>Thu, 16 Apr 2026 00:35:04 +0000</pubDate>
</item>
<item>
<title>Introducing SWFT - Simple Web-based File Transfer! ????✨</title>
<link>https://coderlegion.com/1565/introducing-swft-simple-web-based-file-transfer</link>
<description>
&lt;p&gt;In today's digital age, file sharing has become an integral part of our daily routines. Whether it's sharing documents for work, sending photos to friends and family, or collaborating on projects, having a reliable and user-friendly file sharing solution is crucial. That's where SWFT - Simple Web-based File Transfer - shines, and the best part? It's open source!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://nnisarg.in/images/blog/swft-ui.jpg&quot; alt=&quot;SWFT&quot;&gt;&lt;/p&gt;
&lt;h2&gt;The SWFT Advantage&lt;/h2&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/nnisarggada/swft&quot;&gt;SWFT&lt;/a&gt; is a lightweight and intuitive web-based file sharing service that simplifies the process of sharing files with others. With its impressive set of features, it's poised to become your go-to file sharing solution. Let's take a closer look at what sets SWFT apart:&lt;/p&gt;
&lt;h2&gt;Seamless File Uploads and Shareable Links&lt;/h2&gt;
&lt;p&gt;SWFT makes uploading files a breeze. Whether it's a single document or a collection of photos, you can quickly and easily upload your files to the platform. Once uploaded, SWFT generates shareable links that you can send to your recipients. It's a straightforward process that eliminates the need for complex setups or software installations.&lt;/p&gt;
&lt;h2&gt;Customizable Links for Personalized Sharing&lt;/h2&gt;
&lt;p&gt;One of SWFT's standout features is its ability to customize shareable links. Instead of sharing long and cryptic URLs, you can assign user-defined names to your links. This personal touch makes sharing files more professional and accessible.&lt;/p&gt;
&lt;h2&gt;Time-Limited File Sharing&lt;/h2&gt;
&lt;p&gt;Privacy and security are paramount when sharing files online. SWFT allows you to set a specified time period for file retention. After this duration, your files are automatically deleted. This feature ensures that your shared files have a limited lifespan, adding an extra layer of security and privacy to your file sharing.&lt;/p&gt;
&lt;h2&gt;Support for Command-Line Users&lt;/h2&gt;
&lt;p&gt;SWFT caters to all types of users, including those who prefer command-line tools like curl or wget. This versatility means that tech-savvy individuals can seamlessly integrate SWFT into their workflow. Here's an example command using curl to upload a file and customize your shareable link:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -X POST -F &quot;file=@path/to/your/file&quot; -F &quot;link=my-custom-link&quot; -F &quot;time=1800&quot; &lt;a href=&quot;https://share.nnisarg.in/upload&quot; rel=&quot;nofollow&quot;&gt;https://share.nnisarg.in/upload&lt;/a&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Simply replace &lt;code&gt;path/to/your/file&lt;/code&gt; with the actual path to your file, &lt;code&gt;my-custom-link&lt;/code&gt; with your preferred link name and &lt;code&gt;1800&lt;/code&gt; with the desired time period in seconds. This command allows you to harness the power of SWFT directly from the command line, making file sharing a breeze for tech-savvy users.&lt;/p&gt;
&lt;h2&gt;How to Get Started with SWFT&lt;/h2&gt;
&lt;p&gt;Getting started with SWFT is as easy as 1-2-3:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit the &lt;a rel=&quot;nofollow&quot; href=&quot;https://share.nnisarg.in&quot;&gt;SWFT website&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Upload your files and customize your shareable link and delete time if desired.&lt;/li&gt;
&lt;li&gt;Share the link with your intended recipients.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It's that simple! SWFT streamlines the file sharing process, making it accessible to users of all levels of tech proficiency.&lt;/p&gt;
&lt;h2&gt;Get Involved on GitHub&lt;/h2&gt;
&lt;p&gt;Ready to get involved with SWFT? Visit our GitHub repository at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/nnisarggada/swft&quot;&gt;SWFT on GitHub&lt;/a&gt;. Here, you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fork the project: Create your own copy of SWFT and start making changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Report issues: If you encounter a bug or have a feature request, let us know by creating an issue on GitHub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Contribute code: If you're a developer, you can contribute directly to the project by submitting pull requests.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Join the community: Connect with other SWFT users and developers to share ideas and collaborate.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Join the SWFT Community Today&lt;/h2&gt;
&lt;p&gt;Whether you're a casual user or a seasoned developer, SWFT welcomes you to join our open source community. Together, we can create a file sharing solution that meets the needs of users worldwide. Visit our GitHub repository, explore the code, and start sharing files effortlessly with SWFT today! Your files, your way, with SWFT!&lt;/p&gt;

</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/1565/introducing-swft-simple-web-based-file-transfer</guid>
<pubDate>Mon, 17 Mar 2025 21:39:51 +0000</pubDate>
</item>
</channel>
</rss>