Sponsored Content
Full Discussion: Specify the inode of a file?
Operating Systems Solaris Specify the inode of a file? Post 302894517 by unblockable on Tuesday 25th of March 2014 09:36:48 PM
Old 03-25-2014
Quote:
Originally Posted by jlliagre
The dtrace script has hopefully no impact in the target file.
From anywhere you like.

This is the expected output. You should leave the script running for the inode renumbering hack to persist.
As Bartus11 already stated, just use another terminal to experiment with you program expecting a large inode number.
Thank you for the clarification!

It looks like when I run
Code:
ls -li

it shows the real inode, but
Code:
ls -li <filename>

is showing the fake (large) inode:
Code:
[root@sol10: /data/xx]# ls -li
total 770488
  52000532 -rw-r--r--   1 root     root           0 Mar 24 10:52 asdf
  68687063 -rw-r--r--   1 root     root           0 Mar 25 17:18 passwd2

[root@sol10: /data/xx]# ls -li /data/xx/passwd2
100000000000 -rw-r--r--   1 root     root           0 Mar 25 17:18 /data/xx/passwd2

Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file access inode update

When is a file "accessed" according to UNIX? For example: gzipping a file will not change the access time. (1 Reply)
Discussion started by: dangral
1 Replies

2. Ubuntu

fd.file-max against inode

Hi, If inodes need to be 3-4 times greater than fd.file-max. Can you modify the current inode in the filesystem? Can you modify it on the fly? Or only in the creation of FS. I'm using redhat ent 4. Thank you for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

3. Filesystems, Disks and Memory

Recreating a deleted hardlink to a file if I know the inode number

At risk of twisting the rules to nearly the point of breaking (if you think this goes too far mods, I apologise and accept that this should be deleted), I'm hoping someone might be able to cast a little light on the following problem regarding hard links to files. ... (6 Replies)
Discussion started by: Smiling Dragon
6 Replies

4. Shell Programming and Scripting

Read from file specific place in file using inode

Hello, I am using tcsh on AIX. I would like to write a script that does the following: 1. given an inode, how do I find exactly the name of the file? I know I could do this using ls -i | grep <inode> but it returns: <inode> <filename>. I need some string manipulation or something to... (1 Reply)
Discussion started by: lastZenMaster
1 Replies

5. 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

6. Shell Programming and Scripting

changing a file when the inode modified time of the other file changes

i have a requirement where i needed to change variable values in a properties file(first file) whenever there is change to Release details file(second file). My question is do i have to create a daemon process that always checks the modified time/inode change of the second file and then change the... (1 Reply)
Discussion started by: saikiran_1984
1 Replies

7. 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

8. UNIX for Advanced & Expert Users

remove file/inode entry

Hello all, I am on hpux itanium 11.31...and we run a oracle DB on it. I am testing some backup and restore situation.... first i select some data from the DB.....now i remove some files from the DB where my data is being selected from.....now i select the same data from the DB but i still get... (5 Replies)
Discussion started by: abdul.irfan2
5 Replies

9. 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

10. 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
FSDB(8) 						    BSD System Manager's Manual 						   FSDB(8)

NAME
fsdb -- FFS debugging/editing tool SYNOPSIS
fsdb [-d] [-f] [-r] fsname DESCRIPTION
The fsdb utility opens fsname (usually a raw disk partition) and runs a command loop allowing manipulation of the file system's inode data. You are prompted to enter a command with fsdb (inum X)> where X is the currently selected i-number. The initial selected inode is the root of the file system (i-number 2). The command processor uses the editline(3) library, so you can use command line editing to reduce typing if desired. When you exit the command loop, the file system superblock is marked dirty and any buffered blocks are written to the file system. The following options are available: -d Enable additional debugging output (which comes primarily from fsck(8)-derived code). -f Left for historical reasons and has no meaning. -r Open the file system read/only, and disables all commands that would write to it. COMMANDS
Besides the built-in editline(3) commands, fsdb supports these commands: help Print out the list of accepted commands. inode i-number Select inode i-number as the new current inode. back Revert to the previously current inode. clri i-number Clear i-number. lookup name cd name Find name in the current directory and make its inode the current inode. Name may be a multi-component name or may begin with slash to indicate that the root inode should be used to start the lookup. If some component along the pathname is not found, the last valid directory encountered is left as the active inode. This command is valid only if the starting inode is a directory. active print Print out the active inode. blocks Print out the block list of the active inode. Note that the printout can become long for large files, since all indirect block pointers will also be printed. findblk disk_block_number ... Find the inode(s) owning the specified disk block(s) number(s). Note that these are not absolute disk blocks numbers, but offsets from the start of the partition. uplink Increment the active inode's link count. downlink Decrement the active inode's link count. linkcount number Set the active inode's link count to number. ls List the current inode's directory entries. This command is valid only if the current inode is a directory. rm name del name Remove the entry name from the current directory inode. This command is valid only if the current inode is a directory. ln ino name Create a link to inode ino under the name name in the current directory inode. This command is valid only if the current inode is a directory. chinum dirslot inum Change the i-number in directory entry dirslot to inum. chname dirslot name Change the name in directory entry dirslot to name. This command cannot expand a directory entry. You can only rename an entry if the name will fit into the existing directory slot. chtype type Change the type of the current inode to type. Type may be one of: file, dir, socket, or fifo. chmod mode Change the mode bits of the current inode to mode. You cannot change the file type with this subcommand; use chtype to do that. chflags flags Change the file flags of the current inode to flags. chown uid Change the owner of the current inode to uid. chgrp gid Change the group of the current inode to gid. chgen gen Change the generation number of the current inode to gen. btime time mtime time ctime time atime time Change the creation (birth), modification, change, or access time (respectively) on the current inode to time. Time should be in the format YYYYMMDDHHMMSS[.nsec] where nsec is an optional nanosecond specification. If no nanoseconds are specified, the birthnsec, mtimensec, ctimensec, or atimensec field will be set to zero. Note that btime is available on UFS2 file systems only. quit, q, exit, <EOF> Exit the program. SEE ALSO
editline(3), fs(5), clri(8), fsck(8) HISTORY
The fsdb utility uses the source code for fsck(8) to implement most of the file system manipulation code. The remainder of fsdb first appeared in NetBSD, written by John T. Kohl. Peter Wemm ported it to FreeBSD. BUGS
Manipulation of ``short'' symlinks has no effect. In particular, one should not try changing a symlink's type. You must specify modes as numbers rather than symbolic names. There are a bunch of other things that you might want to do which fsdb does not implement. WARNING
Use this tool with extreme caution--you can damage an FFS file system beyond what fsck(8) can repair. BSD
August 24, 2006 BSD
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy