{"id":427,"date":"2011-03-03T05:19:52","date_gmt":"2011-03-03T11:19:52","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=427"},"modified":"2026-03-26T21:59:35","modified_gmt":"2026-03-27T03:59:35","slug":"how-to-bring-back-deleted-files-using-lsof-command","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/","title":{"rendered":"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Accidentally deleting a file in Linux does not always mean the data is permanently lost. Thanks to how the Linux filesystem works, it is often possible to recover a deleted file \u2014 provided a running process still has it open.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how Linux handles file deletion and how you can recover deleted files using the <strong>\/proc filesystem<\/strong> and the <strong>lsof command<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding How Linux Deletes Files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Linux, a file is essentially a <strong>link to an inode<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An inode stores important metadata such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>File ownership<\/li>\n\n\n\n<li>Permissions<\/li>\n\n\n\n<li>File size<\/li>\n\n\n\n<li>Timestamps<\/li>\n\n\n\n<li>Disk block locations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When you delete a file using the <code>rm<\/code> command, Linux removes only the <strong>directory entry (link)<\/strong> pointing to the inode.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The actual data is <strong>not immediately deleted<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The data remains on disk as long as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A process still has the file open<\/li>\n\n\n\n<li>The inode is still referenced<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Only after all links and open file handles are released will the system free the storage space.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Deleted Files Can Still Be Recovered<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If an application is still using a file after deletion, the file contents remain accessible in memory and through the Linux <strong>process pseudo-filesystem<\/strong> located at:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/proc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Each running process has its own directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/proc\/&lt;PID&gt;\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inside this directory, the <code>fd<\/code> (file descriptor) folder contains links to all files opened by that process:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/proc\/&lt;PID&gt;\/fd\/&lt;FD&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Even if the file no longer appears in directory listings, its data can still be accessed here.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create a Test File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a sample file for testing recovery:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>man lsof | col -b &gt; test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">View the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>less test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will see a plaintext version of the <code>lsof<\/code> manual.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suspend the viewer without closing it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Ctrl + Z<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Do not exit the process \u2014 it must keep the file open.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Confirm File Details<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check the file information:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l test_file<br>stat test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now delete the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify removal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>stat test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>No such file or directory<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Although the file appears deleted, the running process still holds it open.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Identify the Process Holding the File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use <strong>lsof (List Open Files)<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsof | grep test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>less 14094 arun 4r REG ... (deleted) \/test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Important values:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><thead><tr><th>Field<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td>less<\/td><td>Command using the file<\/td><\/tr><tr><td>14094<\/td><td>Process ID (PID)<\/td><\/tr><tr><td>4<\/td><td>File descriptor<\/td><\/tr><tr><td>(deleted)<\/td><td>File removed from filesystem<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Recover the Deleted File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the process file descriptor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/proc\/14094\/fd\/4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the symbolic link:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l \/proc\/14094\/fd\/4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll notice it points to the deleted file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now copy the data back:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp \/proc\/14094\/fd\/4 test_file<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"> Do <strong>not<\/strong> use <code>cp -a<\/code>, as it copies only the symbolic link instead of the actual file contents.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Verify File Recovery<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm restoration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l test_file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Optional validation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>man lsof | col -b &gt; test_file1<br>cmp test_file test_file1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If no differences are shown, the recovery was successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Important Recovery Tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Act immediately after accidental deletion.<\/li>\n\n\n\n<li>Do not close the application using the file.<\/li>\n\n\n\n<li>Pause media players or editors if needed.<\/li>\n\n\n\n<li>Recovery works only while the file remains open by a process.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Linux file deletion removes only directory references \u2014 not the underlying data immediately. By leveraging the <code>\/proc<\/code> filesystem and the <code>lsof<\/code> command, administrators can recover files that appear deleted but are still open by running processes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding this behavior can save critical data and prevent unnecessary downtime caused by accidental deletions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size wp-block-paragraph\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Accidentally deleting a file in Linux does not always mean the data is permanently lost. Thanks to how the Linux filesystem works, it is often possible to recover a deleted&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-427","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO Pro 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"SupportPRO Admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO Pro (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Server Management Tips | SupportPRO Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Recover Deleted Files in Linux Using &quot;lsof&quot; Command ?\" \/>\n\t\t<meta property=\"og:description\" content=\"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-03-03T11:19:52+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-03-27T03:59:35+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Recover Deleted Files in Linux Using &quot;lsof&quot; Command ?\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#article\",\"name\":\"How to Recover Deleted Files in Linux Using \\\"lsof\\\" Command ?\",\"headline\":\"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?\",\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-03-03T05:19:52-06:00\",\"dateModified\":\"2026-03-26T21:59:35-06:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#webpage\"},\"articleSection\":\"Miscellaneous\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"name\":\"Miscellaneous\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"position\":2,\"name\":\"Miscellaneous\",\"item\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#listItem\",\"name\":\"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#listItem\",\"position\":3,\"name\":\"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/category\\\/miscellaneous\\\/#listItem\",\"name\":\"Miscellaneous\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\",\"name\":\"SupportPRO\",\"description\":\"SupportPRO Blog\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"telephone\":\"+18476076123\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/\",\"name\":\"SupportPRO Admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"SupportPRO Admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#webpage\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/\",\"name\":\"How to Recover Deleted Files in Linux Using \\\"lsof\\\" Command ?\",\"description\":\"Learn how to recover deleted files in Linux using lsof and the \\\/proc filesystem. Step-by-step guide to restore files still open by running processes.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/how-to-bring-back-deleted-files-using-lsof-command\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/author\\\/managementadmin\\\/#author\"},\"datePublished\":\"2011-03-03T05:19:52-06:00\",\"dateModified\":\"2026-03-26T21:59:35-06:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/\",\"name\":\"Server Management Tips\",\"description\":\"SupportPRO Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.supportpro.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO Pro -->\r\n\t\t<title>How to Recover Deleted Files in Linux Using &quot;lsof&quot; Command ?<\/title>\n\n","aioseo_head_json":{"title":"How to Recover Deleted Files in Linux Using \"lsof\" Command ?","description":"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.","canonical_url":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#article","name":"How to Recover Deleted Files in Linux Using \"lsof\" Command ?","headline":"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?","author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"},"datePublished":"2011-03-03T05:19:52-06:00","dateModified":"2026-03-26T21:59:35-06:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#webpage"},"isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#webpage"},"articleSection":"Miscellaneous"},{"@type":"BreadcrumbList","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.supportpro.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","name":"Miscellaneous"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","position":2,"name":"Miscellaneous","item":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#listItem","name":"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#listItem","position":3,"name":"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?","previousItem":{"@type":"ListItem","@id":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/#listItem","name":"Miscellaneous"}}]},{"@type":"Organization","@id":"https:\/\/www.supportpro.com\/blog\/#organization","name":"SupportPRO","description":"SupportPRO Blog","url":"https:\/\/www.supportpro.com\/blog\/","telephone":"+18476076123"},{"@type":"Person","@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author","url":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/","name":"SupportPRO Admin","image":{"@type":"ImageObject","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13d2f63048d631e03a432375448be5eb7861069df4fef10f0cb1c7b36554c225?s=96&d=mm&r=g","width":96,"height":96,"caption":"SupportPRO Admin"}},{"@type":"WebPage","@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#webpage","url":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/","name":"How to Recover Deleted Files in Linux Using \"lsof\" Command ?","description":"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.supportpro.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/#breadcrumblist"},"author":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"creator":{"@id":"https:\/\/www.supportpro.com\/blog\/author\/managementadmin\/#author"},"datePublished":"2011-03-03T05:19:52-06:00","dateModified":"2026-03-26T21:59:35-06:00"},{"@type":"WebSite","@id":"https:\/\/www.supportpro.com\/blog\/#website","url":"https:\/\/www.supportpro.com\/blog\/","name":"Server Management Tips","description":"SupportPRO Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.supportpro.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Server Management Tips | SupportPRO Blog","og:type":"article","og:title":"How to Recover Deleted Files in Linux Using &quot;lsof&quot; Command ?","og:description":"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.","og:url":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/","article:published_time":"2011-03-03T11:19:52+00:00","article:modified_time":"2026-03-27T03:59:35+00:00","twitter:card":"summary","twitter:title":"How to Recover Deleted Files in Linux Using &quot;lsof&quot; Command ?","twitter:description":"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes."},"aioseo_meta_data":{"post_id":"427","title":"How to Recover Deleted Files in Linux Using \"lsof\" Command ?","description":"Learn how to recover deleted files in Linux using lsof and the \/proc filesystem. Step-by-step guide to restore files still open by running processes.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"seo_analyzer_scan_date":"2026-03-27 04:37:16","breadcrumb_settings":null,"limit_modified_date":false,"open_ai":null,"ai":{"faqs":[],"keyPoints":[],"titles":[],"descriptions":[],"socialPosts":{"email":[],"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2021-12-10 16:12:12","updated":"2026-06-30 23:19:04"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\" title=\"Home\">Home<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t<a href=\"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/\" title=\"Miscellaneous\">Miscellaneous<\/a>\n<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\tHow to Bring Back Deleted Files Using \u201clsof\u201d Command ?\n<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.supportpro.com\/blog"},{"label":"Miscellaneous","link":"https:\/\/www.supportpro.com\/blog\/category\/miscellaneous\/"},{"label":"How to Bring Back Deleted Files Using &#8220;lsof&#8221; Command ?","link":"https:\/\/www.supportpro.com\/blog\/how-to-bring-back-deleted-files-using-lsof-command\/"}],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=427"}],"version-history":[{"count":4,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/427\/revisions"}],"predecessor-version":[{"id":16687,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/427\/revisions\/16687"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}