Directory Inode Number Not Unique


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Directory Inode Number Not Unique
Prev   Next
# 1  
Old 05-22-2005
Directory Inode Number Not Unique

Hi, I know that inode for each file is unique, but is it the for the directory? So far I found different directories has the same inode nubmer when you do ls -i, could some one explain why? Thanks a lot.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies

2. Linux

Inode number changes for a file in Redhat Linux

Hi, I have created a file a.txt in Redhat Linux. Inode number for a file changes every time i update the file using vi editor , gedit etc. Is there any setting that can be made , such that inode number never changes as that is supposed to be the expected behavior? Or if we cannot... (13 Replies)
Discussion started by: srirammanohar
13 Replies

3. Solaris

Retreive deleted file name if you having inode number

Some one please help me to find deleted file name, if I am having inode number in Solaris without using any 3rd party tool. Thanks :) (3 Replies)
Discussion started by: aksijain
3 Replies

4. Red Hat

Inode number changes for a file in Redhat Linux

Hi, I have created a file abc.log in Redhat Linux. Inode number for a file get changes every time i update the file using vi editor. Is there any setting that can be made , such that inode number never gets changed? Or if we cannot restrict from inode number getting changed , is... (9 Replies)
Discussion started by: raghu.amilineni
9 Replies

5. UNIX for Dummies Questions & Answers

Inode: is it both unique and 'permanent'?

I try to understand the meaning of an inode. I wonder whether an inode is unique (I'm pretty sure it is) and whether it remains the same inode regardless of whatever happens to the file, dir or whatever? I read somewhere that an inode stores info about the file, size... so changing the... (4 Replies)
Discussion started by: dakke
4 Replies

6. Shell Programming and Scripting

Modifying a file without changing inode number

Hi all, I am struggling to change the content of a file without changing the inode number. The exact issue is as below. I have a file name test.bak which has 100 lines of text. I am trying to to delete the first 90 lines of the text in the file. I know that using sed/awk/head/tail I can... (3 Replies)
Discussion started by: sathishkmrv
3 Replies

7. AIX

How to get the filename of which has been deleted if I know the inode number?

How to get the filename of which has been deleted if I know the inode number. i can use the command "istat" to get the inode number of the file. # istat /proc//fd/x If this file has been deleted,but the process of this file has not been closed and handle has not been released ,so this... (3 Replies)
Discussion started by: JoyOnLine
3 Replies

8. UNIX for Dummies Questions & Answers

Number of Inode on a disk

How we can know number of inode present in my Disk including free and occupied. Is there any tool or program to know how much free inode are there in inode free list . (2 Replies)
Discussion started by: mr_deb
2 Replies

9. UNIX for Advanced & Expert Users

how to find out pathname from inode number

Hi all when I execute pmap command on one of my daemon process, I am able to see the following output. Address Kbytes RSS Anon Locked Mode Mapped File 00010000 40 40 - - r-x-- irs026bmd 00028000 56 56 16 - rwx-- irs026bmd 00036000... (3 Replies)
Discussion started by: axes
3 Replies

10. Filesystems, Disks and Memory

Inode number

as kernel keeps track of user activities on a file by its INODE number and I node table . what is the structure of Inode table. and where does this Inode table mapped into?user space or kernel space? is the Inode Number is fixed for a file till its deletion? thanks (1 Reply)
Discussion started by: compbug
1 Replies
Login or Register to Ask a Question
fsdb_vxfs(1M)															     fsdb_vxfs(1M)

NAME
fsdb_vxfs: fsdb - VxFS file system debugger SYNOPSIS
inumber] special DESCRIPTION
The command is a powerful tool that can modify the structural elements of a file system. When used correctly, it can repair damaged file systems. However, when used incorrectly, it can cause serious and possibly unrepairable damage to a file system. can analyze VxFS file system problems or repair a damaged VxFS file system after a crash. A special device special specifies the file sys- tem to debug. The command is intended for experienced users only. can convert block and inumbers into their corresponding disk addresses. In addition, mnemonic offsets allow access to different parts of an inode. These greatly simplify the process of correcting control block entries or descending the file system tree. By default, numbers are considered decimal. You must prefix octal numbers with and prefix hexadecimal numbers with When using hexadecimal numbers, it is preferable to follow the number with a space, because several commands are letters that are also hexadecimal digits. In this document a pound sign indicates that a number is to be specified. reads a block at a time and works with raw and block I/O. All I/O is unbuffered, so changes made to the file system are immediate and changes made by other processes or by the kernel are immediately seen by Options recognizes the following options: generic_options Supported by the generic command. See fsdb(1M). Specify the VxFS file-system type. Clear the inode identified by inumber (non-interactive). Multiple options accumulate. Operands recognizes the following operand: special Name of the special device that contains the VxFS file system to debug. Using Commands and Symbols It is best to separate each token on a command line with a space. Although the command parser does not require element separation, there is no ambiguity in the command language if each token is separated with a space. For example, the command sets the current position to block 0x23b hexadecimal. The command is invalid, because the command is parsed as simply a hexadecimal number. The command positions to block 23 decimal, since the command is not ambiguous. You can separate commands with new lines. You can put multiple commands on one line and separate them with a dot or a semicolon If multi- ple commands are placed on one line, generally only the last command displays results. This allows positioning commands to be followed by printing commands or change commands without intermediate printing. Symbols for the fsdb Command The following symbols are recognized by the command: Print summary of commands that display [modify|format] the file system. Print summary of commands that display [modify|format] the file system. Print summary of commands that display [modify|format] the file system. Escape to shell. Pipe output of to a shell command. Quit. string A character string. Inside a character string, a NULL character can be specified with ``''; a double quote can be specified with ``"''; and a backslash can be specified with ``\ ''. Add, subtract, multiply, divide, and modulus. Assignment An inode in the primary inode list. An inode in the attribute inode list. An allocation unit. A block. The immediate data area of an inode. Small directories and symbolic link files (96 bytes or less) are stored directly in the inode itself, in the area normally occupied by data block numbers and extent sizes. An attribute inode. Current directory block. A directory entry. An inode address entry. A byte. A half-word (2 bytes) A word (4 bytes) A double-word (8 bytes) General print facility Simple calculator and base converter Find a matching pattern in the file system A fileset. An inode allocation unit in the primary inode list. An inode allocation unit in the attribute inode list. The current usage table. The object location table. Map logical file offset to an inode extent. Reset device. Print Facility Print Formats The print facility recognizes the following print formats: Print as a super-block. Print as an allocation-unit header. Print as an auxiliary super-block. Print as intent-log records. Print as inodes. List state table blocks. Print as typed extent descriptors. Print as directory entries. Print as a directory block. Print as a directory header. Print as octal words. Print as octal bytes, half-words, words, or double-words. Print as hexadecimal words. Print as hexadecimal bytes, half-words, words, or double-words. Print as decimal words. Print as decimal bytes, half-words, words, or double-words. Print as unsigned words. Print as unsigned bytes, half-words, words, or double-words. Print as characters. Print as fileset headers. Print as current usage table entries. Print as an inode allocation unit header. Print as an object location table extent. Prints as a BSD quota record. Print as a device record. Symbols in Inode Fields Changes to inode fields can be made symbolically. The following symbols represent inode fields: Inode mode field Inode link count field Inode user ID Number field Inode group ID Number field Low-order word of inode file size field High-order word of inode file size field Inode file size field Inode direct extent data block numbers (0 - 9) Inode direct extent sizes (0 - 9) Inode indirect extent data block numbers (0 - 1) Inode indirect extent size Inode access time field (seconds) Inode access time field (microseconds). Inode change time field (seconds). Inode change time field (microseconds). Inode modification time field (seconds). Inode modification time field (microseconds). Inode allocation flags field. Inode generation count field. Inode mapping type field. Inode fixed extent size field. Inode blocks held field. Inode extended operation flag field. Inode extended operation data field. If device, inode device number. If device, inode major number. If device, inode minor number. If directory, inode parent directory. If regular file, inode reservation. Inode high-order word of serial number. Inode low-order word of serial number. Referencing fileset ID. Inode number of matching inode. Indirect attribute inode. Symbols for Directory Block Fields Changes to directory block fields can be made symbolically. The following symbols represent directory block fields: Total free space (only if in a data block). Hash chain start (0 through 31, only if in a data block). Directory entry (variable number of entries). Number of hash chains. Symbols for Directory Entry Fields Changes to directory entry fields can be made symbolically. The following symbols represent directory entry fields: Inode number Entry name Name length Record length (only if in a data block) Name hash next (only if in a data block) Positions in File Systems and Positioning Commands maintains several positions in the file system: o current position o current primary-inode position (i) o current attribute-inode position (ai) o current inode type (i or ai) o current fileset-header position (fset) o current allocation-unit position (au) o current primary-inode allocation-unit (iau) position o current inode allocation-unit type (iau or aiau) o current attribute-inode allocation-unit (aiau) position These are used by various commands. (The au positions are only supported on the Version 2 disk layout.) The following commands are supported: Set the current position in the file system to the specified offset in bytes, half-words, words, or double-words. If it is the last command on a line, print the byte, half-word, word, or double- words in hexadecimal. Set the current position to the specified relative offset in bytes, half-words, words, or double-words. If it is the last command on a line, print the byte, half-word, word, or double-words in hexadecimal. Set the current position in the file system to the specified allocation unit (au) position. Set the current allocation unit position to the resulting offset. If it is the last command on a line, print the allocation unit header. Set the current position in the file system to the specified position relative to the current allocation unit (au) position. Set the current allocation unit position to the resulting offset. If it is the last command on a line, print the allocation unit header. Set the current position in the file system to the current allocation unit position. If it is the last command on a line, print the allocation unit header. Set the current position in the file system to the specified offset in blocks. Set the current block position to the resulting offset. The block size is the block size of the file system. If it is the last command on a line, print the first word in the block in hexadecimal. Set the current position to specified relative offset in blocks. Set the current block position to the resulting offset. If it is the last command on a line, print the first word in the block in hexadecimal. Set the current position to current block position (the block specified by the last operation). If it is the last command on a line, print the first word in the block in hexadecimal. Set the current position to the current usage table (cut). If it is the last command on a line, print the first current usage table entry. Set the current position to the primary device's configuration record. If it is the last command on a line, print the device-configuration record. Set the current position in the file system to the fileset header entry for the specified fileset index. Set the current fileset position to the resulting offset. If it is the last command on a line, print the specified fileset header. Set the current position in the file system to the fileset header entry for the specified position relative to the current fileset position. Set the current fileset position to resulting offset. If it is the last command on a line, print the specified fileset header. Set the current position in the file system to the current fileset position. If it is the last command on a line, print the fileset header for the current fileset. Set the current position in the file system to the specified attribute inode allocation unit (aiau) in a fileset. Set the current attribute inode allocation unit position to the resulting off- set. If it is the last command on a line, print the attribute inode allocation unit header. Set the current position in the file system to the specified position relative to the current attribute inode allocation unit (aiau) position. Set the current attribute inode allocation unit position to the resulting offset. If it is the last command on a line, print the attribute inode allocation unit header. Set the current position in the file system to the current attribute inode allocation unit (aiau) position. If it is the last command on a line, print the attribute inode allocation unit header. Set the current position in the file system to the specified inode allocation unit (iau) in a fileset. Set the current inode allocation unit position to the resulting offset. If it is the last command on a line, print the inode allocation unit header. Set the current position in the file system to the specified position relative to the current inode allocation unit (iau) position. Set the current inode allocation unit position to the resulting offset. If it is the last command on a line, print the inode allocation unit header. Set the current position in the file system to the current inode allocation unit (iau) position. If it is the last command on a line, print the inode allocation unit header. Set the current position in the current fileset to the ilist entry for the specified attribute inode. Set the current attribute inode position to the resulting offset. If it is the last command on a line, print the ilist entry for the inode. Set the current position in the current fileset to the ilist entry for the specified relative attribute inode. Set the current attribute inode position to the resulting offset. If it is the last command on a line, print the ilist entry for the inode. Set the current position in the current fileset to the current attribute inode position. If it is the last command on a line, print the ilist entry for the inode. Set the current position in the current fileset to the ilist entry for the specified inode. Set the current inode position to the resulting offset. If it is the last command on a line, print the ilist entry for the inode. Set the current position in the current fileset to the ilist entry for the specified relative inode. Set the current inode position to the resulting offset. If it is the last command on a line, print the ilist entry for the inode. Set the current position in the current fileset to the current inode position. If it is the last command on a line, print the ilist entry for the inode. Set the current position to specified offset in blocks specified by the inode address #. Addresses 0 through 9 are for direct extents ( de ). Addresses 10-11 are for indirect extents ( ie ). The addresses are displayed when printing an ilist entry. Set the current block position to the resulting off- set. If it is the last command on a line, print the first word in the block in hexadecimal. Set the current position to immediate data area of the current inode. Set the current block position to the resulting offset. If it is the last command on a line, print the first word of the area in hexadecimal. Set the current position to attribute data area of the current inode. Set the current block position to the resulting offset. If it is the last command on a line, print the first word in the block in hexadecimal. Set the current position and change the number at the specified offset to the given number. If a double-word offset is specified, then two numbers separated by a space are required. The resulting value is printed in hexadecimal. Set the current position and change the number at the specified relative offset to the given number. If a double-word offset is specified, then two numbers separated by a space are required. The resulting value is printed in hexadecimal. Set the current position and change the characters at the specified offset to the given string. The resulting value is printed as a character string. Set the current position and change the characters at the specified relative offset to the given string. The resulting value is printed as a character string. Set the current position to the object location table (olt). If it is the last command on a line, print the object location table. Print the contents of the file system at the current offset as the specified number of entries of a given format. The allowable print formats are specified above. If a number of entries to print is not specified, one entry is printed. Set the contents of the given inode field to the specified number. The current inode specifies the inode list entry to be modified. The symbols representing inode fields are listed above. Set the contents of the given directory block field to the specified number. The current block is treated as a directory block and the offset in that block which is represented by the given field is changed. The symbols representing directory block fields are listed above. Set the current directory entry to the specified number. The current block is treated as a directory block. If the current block is an immediate data area for an inode, then the block is treated as containing immediate directory entries. If it is the last command on a line, the directory entry at the resulting offset is printed. Set the contents of the given directory field to the specified number. The current directory entry specifies where the directory entry is located. The resulting value is printed in hexa- decimal. Set the directory name field of the current directory entry to the specified string. The resulting value is printed as a character string. Take a number or the sum, difference, product or dividend of two numbers and print in decimal, octal, hexadecimal and character format. Search for the given numeric pattern in the file system. The size of the object to match is specified. If a double-word is specified, then two numbers must be given. The search is performed forward from the current offset. A maximum number of blocks to search can be specified. If found, the location and value are printed in hexadecimal. Search for the given character string in the file system. The search is performed forward from the current offset. A maximum number of blocks to search can be specified. If found the location and string are printed. Format all intent log entries. A completely formatted intent log can be quite lengthy. It is a good idea use the command as a filter and redirect the output to a file or pager to look at a complete log format. List all filesets by their indexes and names. Treat the number as a logical offset in the file described by the current inode, and print the extent that it maps to. Does the equivalent of exiting and restarting on same device. Help Commands The following help commands are supported: Display primary help screen. Display modification-commands help screen. Display print-commands help screen. EXAMPLES
Prints inumber 386 in an inode format. This now becomes the current working inode. Changes the link count for the working inode to 4. Prints the super-block of this file system symbolically. Changes the name field in the directory slot to foo. Changes the inumber for the seventh directory slot in the root directory to three (also shows how to combine several operations on one command line) Prints the sixth directory entry in the immediate area of inode 23. WARNINGS
Always run a file system check (see fsck(1M)) after using the command to modify a file system. (Use Some aspects of apply to a specific VxFS disk layout version. SEE ALSO
fsck_vxfs(1M), fsdb(1M). fsdb_vxfs(1M)