Linked Questions
10 questions linked to/from Can a file be retrieved by its inode?
1
vote
1
answer
1k
views
open a file by inode number [duplicate]
Is there any way to find exactly the blocks allocated to a inode, and view that file? I don't care if I have to be on a live cd, but i need to do this for example:
cat verylongsentice > a
ls -i a
...
0
votes
1
answer
559
views
Is there any way to recover files from the informations in `/proc`? [duplicate]
I have just asked in an interview that if someone mistakenly deletes apache logfile from /var/log/apache/access.log while it's being written, can you recover it?
After my answer interviewer said that ...
0
votes
1
answer
194
views
Deleted directory of a running program [duplicate]
I started a program on a directory but accidentally removed it, and the program inside. The program generates a couple of output files. The program is still running. I wonder if I create the same ...
1
vote
0
answers
90
views
Deleted file being written to by running process, can I recreate it? [duplicate]
I've started a long running process with nohup and redirected it's output to a log file
Example:
nohup ./bin/zkServer.sh start-foreground > /usr/local/myuser/logs/zkout.log 2>&1 &
I ...
20
votes
2
answers
5k
views
How to create a hard link to an inode (ext4)?
If I know the index node (inode) of a file, but I don't know its path (or any of its paths), is it possible to create a hard link to that inode directly?
I could find the file using sudo find / -inum ...
5
votes
2
answers
991
views
How to restore a deleted file while it's still being opened?
I tried
xtricman⚓ArchVirtual⏺️~🤐ls /proc/self/fd/ -l
Total 0
lrwx------ 1 xtricman users 64 1月 16 16:34 0 -> /dev/pts/0
lrwx------ 1 xtricman users 64 1月 16 16:34 1 -> /dev/pts/0
lrwx------ ...
5
votes
1
answer
652
views
Is there a tool to create a hard link to an unlinked inode?
Assume you have a filename/directory name, whatever, which is hard linked to inode 6400. Alas, the file/directory actually exists (completely intact, and maybe it only lives in a single data block, ...
1
vote
1
answer
1k
views
Reading stale file data with debugfs cat
I'm trying to read the contents of a file using the file's inode.
This works fine:
echo "First line" > data.txt
sync
sudo debugfs -R "cat <$(stat -c %i data.txt)>" /dev/...
0
votes
1
answer
663
views
can we specify number of inode & data block?
I learned that number of inode and datablock is assigned when created,
but for example, if we want "text.txt" this file to be stored in inode number 20 or datablock number 20, can we do it?
1
vote
0
answers
29
views
I Node and Data Retrieval
Is there a way possible to open a data block without the file if we know the i node number that it's linked to ? Is it possible to open the content in data block without the file ?