Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Psychology Of Color In UX Design And Digital Products

      August 15, 2025

      This week in AI dev tools: Claude Sonnet 4’s larger context window, ChatGPT updates, and more (August 15, 2025)

      August 15, 2025

      Sentry launches MCP monitoring tool

      August 14, 2025

      10 Benefits of Hiring a React.js Development Company (2025–2026 Edition)

      August 13, 2025

      Your smart home device just got a performance and security boost for free

      August 18, 2025

      Ultrahuman brings advanced cycle and ovulation tracking to its smart ring

      August 18, 2025

      DistroWatch Weekly, Issue 1135

      August 17, 2025

      14 secret phone codes that unlock hidden features on your Android and iPhone

      August 17, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Air Quality Prediction System using Python ML

      August 17, 2025
      Recent

      Air Quality Prediction System using Python ML

      August 17, 2025

      AI’s Hidden Thirst: The Water Behind Tech

      August 16, 2025

      Minesweeper game in 100 lines of pure JavaScript – easy tutorial

      August 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      DistroWatch Weekly, Issue 1135

      August 17, 2025
      Recent

      DistroWatch Weekly, Issue 1135

      August 17, 2025

      Ubuntu’s New “Dangerous” Daily Builds – What Are They?

      August 17, 2025

      gofmt – formats Go programs

      August 17, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Learning Resources»Linux Data Recovery: How to Salvage Lost or Corrupted Files

    Linux Data Recovery: How to Salvage Lost or Corrupted Files

    May 1, 2025
    Linux Data Recovery: How to Salvage Lost or Corrupted Files
    by George Whittaker

    Data loss is a nightmare for any computer user, and Linux users are no exception. Despite the robust architecture of Linux operating systems, disasters can strike in the form of accidental deletions, corrupted partitions, or failing storage devices. Whether you’re a system administrator, developer, or everyday Linux user, understanding how to recover data can be the difference between a minor inconvenience and a major setback.

    This guide will walk you through the practical strategies and essential tools for recovering lost or corrupted files on Linux.

    Understanding Data Loss on Linux

    Common Causes of Data Loss

    Data loss can occur for various reasons:

    • Accidental Deletion: Files removed with rm or cleared trash.

    • Filesystem Corruption: Caused by improper shutdowns, power failures, or software bugs.

    • Partition Issues: Misconfigured or overwritten partition tables.

    • Hardware Failures: Hard drive degradation, bad sectors, or failing SSDs.

    How Deletion Works on Linux

    Linux filesystems like ext4 don’t immediately erase data when a file is deleted. Instead, the filesystem marks the file’s space as free. Until that space is overwritten, the data may be recoverable. This behavior is the cornerstone of most recovery techniques.

    First Steps After Data Loss

    The most critical step is to minimize system activity on the affected drive. Any write operation can potentially overwrite recoverable data.

    Disconnect and Mount Read-Only

    If the loss happened on a secondary drive, physically disconnect it and mount it read-only on another machine:

    sudo mount -o ro /dev/sdX1 /mnt/recovery

    Create a Disk Image

    Use tools like dd or ddrescue to create a complete image of the drive for analysis:

    sudo dd if=/dev/sdX of=/mnt/external/backup.img bs=4M status=progress

    Or with ddrescue, which handles read errors more gracefully:

    sudo ddrescue /dev/sdX /mnt/external/recovery.img /mnt/external/logfile

    Work from the image to preserve the original drive.

    Boot from a Live Environment

    To avoid using the target system, boot into a Live Linux distribution like:

    • SystemRescueCD – tailored for system repair.

    • Ubuntu Live CD – user-friendly and widely available.

    Go to Full Article

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHow to Build Custom Distributions from Scratch
    Next Article Last Week in AI #308 – The Leaderboard Illusion, ChatGPT Glazing, Qwen 3, Ernie X1

    Related Posts

    Learning Resources

    What I learned from Inspired

    August 17, 2025
    Learning Resources

    Talk to more users sooner

    August 17, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    Build a conversational data assistant, Part 1: Text-to-SQL with Amazon Bedrock Agents

    Machine Learning

    PHP 8.5 Introduces an INI Diff Option

    Development

    How to build secure and scalable remote MCP servers

    News & Updates

    CVE-2025-4508 – PHPGurukul e-Diary Management System SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-3441 – CVE-2022-1234: Adobe Flash Type Confusion Vulnerability

    April 22, 2025

    CVE ID : CVE-2025-3441

    Published : April 22, 2025, 11:15 p.m. | 3 hours, 38 minutes ago

    Description : Rejected reason: This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Distribution Release: AxOS 25.06

    June 1, 2025

    CVE-2025-46811 – SUSE Manager WebSocket Root RCE

    July 30, 2025

    If you’ve started to notice Xbox console games showing up on the Xbox PC store, you’re not alone — what’s going on?

    June 8, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.