directory inode from file inode?

directory inode from file inode?

Post by Mike Kenned » Sun, 21 Feb 1999 04:00:00



Say I have the following situation where there is a file called foo in the
/tmp directory. How can I given the inode for the file 'foo' get the inode
for the directory, /tmp. This is within kernel space.

:===========================================================:

: Systems Administrator                 (909) 787-2946      :
: Computer Science Department                               :
: University of California, Riverside                       :
:===========================================================:

 
 
 

directory inode from file inode?

Post by L J Bay » Tue, 23 Feb 1999 04:00:00



>Say I have the following situation where there is a file called foo in the
>/tmp directory. How can I given the inode for the file 'foo' get the inode
>for the directory, /tmp. This is within kernel space.

I know nothing about kernel space, but I would say you can't do it.
Think of hard links (and a file having multiple links): there is no
unique 1:1 relationship between a file (or its inode) and the parent
directory (or its inode). A file can have any N >= 0 parents.

 
 
 

1. I have filled up with inodes on /usr, can I change inode withour reinstall?

I have FreeBSD 4.5, a recent install. When trying to install Pine, and a couple of small apps, I
ran into inode trouble.
I am full of inodes in /usr and have searched everywhere for information about it.
The best so far is http://www.freebsddiary.org/inodes.php
However, I do not know if it is possible to change inode on /usr without corrupting what's there
already? Is it, and if so how?
Furthermore, if it isn't possible, how do I change the inode during sysinstall? I don't think I
have seen it anywhere.

Another inode question. when using the pc, will the inodes slowly increase until I have filled it
again?
I am concerned that after xx months of use, I decide to install another application, and i run
into the same problem again.
If I delete an application, will the inodes connected with that app. disappear, and will it be
available for the next app?

So many questions and hopefully so many answers.
Please cc: me if replying.
Thanks in advance for all help.

kolsen
a fresh, and interested new FreeBSD user

2. help on Gnome 2.2 installation with RH80

3. grow inodes: inode-max limit reached error.

4. posting via tin

5. fs/inode.c sync fix and fs/ext2/inode.c tidy

6. Red Hat Linux - Convert Monochrome install to Color?

7. how to access inode structure based on inode number ?

8. Neat, unknown (?) network printing tool

9. BSD inodes vs. SYSV inodes?

10. grow-inodes: inode-max limit reached

11. Bad blocks, inodes and .badblocks -> Make root inode 2

12. Question about deleting inode / drop inode

13. Ext2 zeros inode in directory entry when deleting files.