Replace "passwd" with whatever filename you want to fake inode for. Then run:
In the other terminal run:
Change the filename of the file that you are checking with "ls", if you changed the filename in the "fake_inode.d" script. This should produce:
Thank you. I changed the filename to "passwd2" because I wasn't sure what impact this would have on my /etc/passwd file.
Was I supposed to run fake_inode.d from within /etc? I created fake_inode.d and passwd2 inside /data, and ran the script from there. It has been saying this for a while:
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT V7
dtrace
DTRACE(1) General Commands Manual DTRACE(1)NAME
dtrace - Dtrace compatibile user application static probe generation tool.
SYNOPSIS
dtrace -s file [OPTIONS]
DESCRIPTION
The dtrace command converts probe descriptions defined in file.d into a probe header file via the -h option or a probe description file via
the -G option.
OPTIONS -h generate a systemtap header file.
-G generate a systemtap probe definition object file.
-o file
is the name of the output file. If the -G option is given then the output file will be called file.o; if the -h option is given
then the output file will be called file.h.
-C run the cpp preprocessor on the input file when the -h option is given.
-I file
give this include path to cpp when the -C option is given.
-k keep temporary files, for example the C language source for the -G option.
--types
generate probe argument typedef information when the -h option is given.
EXAMPLES
Systemtap is source compatible with dtrace user application static probe support. Given a file test.d containing:
provider sdt_probes
{
probe test_0 (int type);
probe test_1 (struct astruct node);
};
struct astruct {int a; int b;};
Then the command "dtrace -s test.d -G" will create the probe definition file test.o and the command "dtrace -s test.d -h" will create the
probe header file test.h Subsequently the application can define probes using
#include "test.h"
...
struct astruct s;
...
SDT_PROBES_TEST_0(value);
...
SDT_PROBES_TEST_1(s);
The application is linked with "test.o" when it is built.
SEE ALSO stap(1)stappaths(7)DTRACE(1)