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

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 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

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

      July 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 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

    News & Updates

    A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

    July 22, 2025
    News & Updates

    “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

    July 22, 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

    How to Download DOOM: The Dark Ages on PC (2025 Guide)

    Operating Systems

    Windows 11 24H2 is crashing on many PCs due to conflict with security driver

    News & Updates

    Windows 11 Insider Beta KB5058496 update adds AI agents to Settings app on eligible PCs

    Operating Systems

    CVE-2025-20297 – Splunk Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-5411 – Mist Community Edition Cross-Site Scripting Vulnerability

    June 1, 2025

    CVE ID : CVE-2025-5411

    Published : June 1, 2025, 11:15 p.m. | 4 hours, 5 minutes ago

    Description : A vulnerability was found in Mist Community Edition up to 4.7.1. It has been rated as problematic. This issue affects the function tag_resources of the file src/mist/api/tag/views.py. The manipulation of the argument tag leads to cross site scripting. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 4.7.2 is able to address this issue. The patch is named db10ecb62ac832c1ed4924556d167efb9bc07fad. It is recommended to upgrade the affected component.

    Severity: 3.5 | LOW

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

    CVE-2025-7478 – Apache Code-Projects Modern Bag SQL Injection Vulnerability

    July 12, 2025

    Control Statements in C: A Comprehensive Guide

    July 16, 2025

    Universal Design Principles Supporting Operable Content – Flexibility in Use

    April 17, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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