Subject: finding file by occupied blocks in FFS
To: None <netbsd-help@netbsd.org>
From: Michael Olbricht <s_olbric@ira.uka.de>
List: netbsd-help
Date: 07/10/2000 11:49:17
Hello,
I wonder how I can find a file on FFS which uses
a known block. Since searching in the man/info pages
and the mailing list archives did not help,
I ask in netbsd-help.
What I actually want to do is to recover the contents
of some bad blocks (e.g. from backup) and then
have them marked as unusable.
I have tried to pipe some commands into fsdb -n
to give me a list of blocks ordered by i-node number,
but encountered two problems:
1. Reading from a pipe messes up the input for fsdb,
a simple input of
"inode 4"
"blks"
"exit" (the quotation marks are just for enclosing
the actual input lines)
piped into fsdb gives the errors
fsdb: command `inode' takes 1 arguments
fsdb: usage: inode: Set active inode to INUM
fsdb: rval was 1
With longer input, the lines become garbled - single
characters within words or complete words missing.
This may be a problem with editline.
2. The number of used i-nodes is large on that FS (around
400 000).
I use NetBSD/pmax 1.4.2-release.
Bye
Michael Olbricht