How to undelete any open, deleted file on linux / solaris

# uname -a
SunOS cmsgcc 5.10 Generic_137137-09 sun4v sparc SUNW,SPARC-Enterprise-T5220

# echo "Undelete any open file" > test.txt
# tail -f test.txt &

25552
# Undelete any open file

# rm test.txt
# ls /proc/25552/fd

0 1 2

# cat /proc/25552/fd/0
Undelete any open file

# cp /proc/25552/fd/0 ./test.txt
# cat ./test.txt

Undelete any open file
#

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.