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

      What I Wish Someone Told Me When I Was Getting Into ARIA

      June 17, 2025

      SD Times 100

      June 17, 2025

      Managing the growing risk profile of agentic AI and MCP in the enterprise

      June 17, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 16, 2025

      Funny Windows 11 bug brings back classic Windows boot sound from 20 years ago

      June 17, 2025

      Windows 11 news and updates in June: Microsoft’s AI agent in Settings makes adjusting your PC easier than ever

      June 17, 2025

      uBlock Origin ships to Edge for Android as Google kills it on Chrome

      June 17, 2025

      Windows Hello face unlock no longer works in the dark, and Microsoft says it’s not a bug

      June 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

      Community News: Latest PECL Releases (06.17.2025)

      June 17, 2025
      Recent

      Community News: Latest PECL Releases (06.17.2025)

      June 17, 2025

      Stream-Omni: Simultaneous Multimodal Interactions with Large Language-Vision-Speech Model

      June 17, 2025

      How Inclusive Design Leading and Creating Solutions for Universal Design

      June 17, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Funny Windows 11 bug brings back classic Windows boot sound from 20 years ago

      June 17, 2025
      Recent

      Funny Windows 11 bug brings back classic Windows boot sound from 20 years ago

      June 17, 2025

      Windows 11 news and updates in June: Microsoft’s AI agent in Settings makes adjusting your PC easier than ever

      June 17, 2025

      uBlock Origin ships to Edge for Android as Google kills it on Chrome

      June 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

    News & Updates

    Funny Windows 11 bug brings back classic Windows boot sound from 20 years ago

    June 17, 2025
    News & Updates

    Windows 11 news and updates in June: Microsoft’s AI agent in Settings makes adjusting your PC easier than ever

    June 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

    Google Chrome to Drop Support for macOS Big Sur in August 2025

    Operating Systems

    You can now share an app/browser window with Copilot Vision to help you with different tasks

    Operating Systems

    Gemma: Introducing new state-of-the-art open models

    Artificial Intelligence

    CVE-2024-13929 – ASPECT Servlet Injection Remote Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Artificial Intelligence

    Pushing the frontiers of audio generation

    May 29, 2025

    Our pioneering speech generation technologies are helping people around the world interact with more natural,…

    CVE-2025-37888 – Intel Mellanox Linux Null Pointer Dereference Vulnerability

    May 9, 2025

    PyQSO – contact logging tool for amateur radio operators

    June 12, 2025

    bfdcxbxcwedfegdhbvdszxczxbcgfvcxbvxzvxcn hgcfhbgvzxvc

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

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