3 ms·
In *BSD you can use fsdb to link an inode to a directory, ala: -# fsdb /dev/ufs/foo > inode 424242 # inode number of the target directory > ln 8213
by Freaky 18y ago
In *BSD you can use fsdb to link an inode to a directory, ala:
-# fsdb /dev/ufs/foo
> inode 424242 # inode number of the target directory
> ln 821339 myimportantfile
You might also need to do "inode 821339" and "uplink" to increment the link count. Alas, you can't do this on a live filesystem, at least not safely, and once deleted the inode will be cleared, so doing this won't get your file back. Maybe if you pull the plug and try it on an unclean filesystem?