<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: deleted file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714367#M42769</link>
    <description>&amp;gt; # lsof |grep tftpboot&lt;BR /&gt;&amp;gt; in.tftpd 5281 root cwd DIR 251,0 0 2223873 /tftpboot (deleted)&lt;BR /&gt;&lt;BR /&gt;Note that the line says "cwd" and "DIR". /tftpboot is not a file, but a directory. It is the current working directory of process 5281. Looks like this is a TFTP server process, started by inetd.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # ls -la /proc/5281/fd/4&lt;BR /&gt;&amp;gt; lrwx------ 1 root root 64 2010-11-16 21:34 /proc/5281/fd/4 -&amp;gt; socket:[28748] &lt;BR /&gt;&lt;BR /&gt;This indicates /proc/5281/fd/4 is a socket, not a regular file. It probably represents a network connection to a TFTP client, or perhaps a local connection to the syslog service. I'd say copying it would not be meaningful.&lt;BR /&gt;&lt;BR /&gt;When the /tftpboot directory was deleted, one of two things may have happened: either the directory was empty, or the deletion command was given with the recursive option and it deleted all the files and sub-directories in the directory.&lt;BR /&gt;&lt;BR /&gt;Rebuilding the directory itself is simple:&lt;BR /&gt;&lt;BR /&gt;mkdir /tftpboot&lt;BR /&gt;&lt;BR /&gt;But because there are no files currently open in the /tftpboot directory, any files that might have been there are now gone.&lt;BR /&gt;&lt;BR /&gt;Look for backups if you want to recover them.&lt;BR /&gt;&lt;BR /&gt;(I think a TFTP server would only hold regular files open while a TFTP GET or PUT operation is ongoing; it would have no reason to hold any files open beyond that.)&lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Wed, 17 Nov 2010 14:06:28 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-11-17T14:06:28Z</dc:date>
    <item>
      <title>deleted file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714363#M42765</link>
      <description>root@pxe001bri:~# lsof |grep tftpboot&lt;BR /&gt;in.tftpd   5281     root  cwd       DIR              251,0        0    2223873 /tftpboot (deleted)&lt;BR /&gt;&lt;BR /&gt;Hi there&lt;BR /&gt;I'm trying to recover the above file. &lt;BR /&gt;root@pxe001bri:~# cp /proc/5281/fd/4 myfile.saved&lt;BR /&gt;cp: cannot open `/proc/5281/fd/4' for reading: No such device or address&lt;BR /&gt;&lt;BR /&gt;root@pxe001bri:~# ls -la /proc/5281/fd/4&lt;BR /&gt;lrwx------ 1 root root 64 2010-11-16 21:34 /proc/5281/fd/4 -&amp;gt; socket:[28748] &lt;BR /&gt;&lt;BR /&gt;Anyone knows how to recover from that ?</description>
      <pubDate>Wed, 17 Nov 2010 02:53:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714363#M42765</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2010-11-17T02:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: deleted file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714364#M42766</link>
      <description>What version of Linux are you running?&lt;BR /&gt;&lt;BR /&gt;Why would you want to copy a socket?</description>
      <pubDate>Wed, 17 Nov 2010 08:06:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714364#M42766</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-17T08:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: deleted file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714365#M42767</link>
      <description>Debian - so what do I do ?&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Nov 2010 13:43:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714365#M42767</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2010-11-17T13:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: deleted file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714366#M42768</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Debian - so what do I do ?&lt;BR /&gt;&lt;BR /&gt;Why ask in an HP-UX forum?</description>
      <pubDate>Wed, 17 Nov 2010 13:57:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714366#M42768</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-11-17T13:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: deleted file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714367#M42769</link>
      <description>&amp;gt; # lsof |grep tftpboot&lt;BR /&gt;&amp;gt; in.tftpd 5281 root cwd DIR 251,0 0 2223873 /tftpboot (deleted)&lt;BR /&gt;&lt;BR /&gt;Note that the line says "cwd" and "DIR". /tftpboot is not a file, but a directory. It is the current working directory of process 5281. Looks like this is a TFTP server process, started by inetd.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # ls -la /proc/5281/fd/4&lt;BR /&gt;&amp;gt; lrwx------ 1 root root 64 2010-11-16 21:34 /proc/5281/fd/4 -&amp;gt; socket:[28748] &lt;BR /&gt;&lt;BR /&gt;This indicates /proc/5281/fd/4 is a socket, not a regular file. It probably represents a network connection to a TFTP client, or perhaps a local connection to the syslog service. I'd say copying it would not be meaningful.&lt;BR /&gt;&lt;BR /&gt;When the /tftpboot directory was deleted, one of two things may have happened: either the directory was empty, or the deletion command was given with the recursive option and it deleted all the files and sub-directories in the directory.&lt;BR /&gt;&lt;BR /&gt;Rebuilding the directory itself is simple:&lt;BR /&gt;&lt;BR /&gt;mkdir /tftpboot&lt;BR /&gt;&lt;BR /&gt;But because there are no files currently open in the /tftpboot directory, any files that might have been there are now gone.&lt;BR /&gt;&lt;BR /&gt;Look for backups if you want to recover them.&lt;BR /&gt;&lt;BR /&gt;(I think a TFTP server would only hold regular files open while a TFTP GET or PUT operation is ongoing; it would have no reason to hold any files open beyond that.)&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 17 Nov 2010 14:06:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/deleted-file/m-p/4714367#M42769</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-11-17T14:06:28Z</dc:date>
    </item>
  </channel>
</rss>

