Sponsored Content
Operating Systems Linux Red Hat Inode number changes for a file in Redhat Linux Post 302514957 by Perderabo on Monday 18th of April 2011 02:39:38 PM
Old 04-18-2011
I cannot reproduce this.
Code:
$
$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5.1 (Tikanga)
$ echo hello > testfile
$ ls -i testfile
3180926 testfile
$ vi testfile
$ cat testfile
hello there
$ ls -i testfile
3180926 testfile
$

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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. (9 Replies)
Discussion started by: nj302
9 Replies

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

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

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

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

6. Solaris

How to increase or decrease inode number of the particular UFS filesystem

Hi Gurus I want to know the command & tips regarding, how to increase or decrease inode number of the particular ufs filesystem. Is it possible to do it in a live/production environment. Regards (3 Replies)
Discussion started by: girish.batra
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. 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

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
mkcdsl(8)						      System Manager's Manual							 mkcdsl(8)

NAME
mkcdsl - Make a context-dependent symbolic link (CDSL) SYNOPSIS
/usr/sbin/mkcdsl [-bfnqv] [-i | -c | -a] [sourcename] [targetname] OPTIONS
All members. Copy the existing file or directory to a member-specific area on all members. Boot partition. In a cluster, the CDSL is placed on the boot partition. On a standalone system, an entry in added to the CDSL inventory file, and the CDSL will be created on the boot partition when the system is converted to a cluster by running clu_create. Copy the existing file or directory to a member-specific area on this member only. Force the overwriting of the existing CDSL or member-specific file or directory. When the force option is used with a copy option, mkcdsl will overwrite an existing member-specific file or directory. Without the force (-f) option, mkcdsl issues an error or message whenever the physical path of the target differs from the specified targetname (for example, when targetname resolution traverses a symbolic link), or when the source for a specified copy option cannot be found. Unless the -f option is specified, mkcdsl will exit when it encounters a situation that would generate an error message. The mkcdsl command issues a warning message if the specified sourcename differs from the calculated sourcename. However, you do not need the -f option to stop mkcdsl from exiting when it encounters a situation that generates a warning message. Inventory only. Check the files and update the inventory: If targetname is a CDSL, add a new entry or update the existing entry in /var/adm/cdsl_admin.inv. If targetname is not a CDSL or does not exist, remove its entry from /var/adm/cdsl_admin.inv. No execute mode. Display what would be done but do not create or change anything. Quiet. Stdout and stderr are redirected to /dev/null. Verbose. The pathname of the member-specific file to be linked. By default, each CDSL created by mkcdsl has a sourcename that points to the default member-specific area in the file system where the targetname resolves. For example, /usr/cluster/mem- bers/{memb}/ is the default member-specific area for the /usr file system. When issued without an explicit sourcename, mkcdsl creates a sourcename that points to this default member-specific area using a relative pathname. In most cases, this default behavior is satisfac- tory. It creates a relative link that resolves properly regardless of where the file system is mounted. If you specify a sourcename, mkcdsl uses this value as the pathname to the member-specific file or directory. The sourcename must include the member-context path compo- nent {memb}. The pathname of the new CDSL entry to be created. If targetname exists, the -f, -c or -a options are required. If the reso- lution of the targetname traverses any symbolic links or file system mount points, the default value of sourcename is adjusted such that the member-specific files are placed in the same file system to which targetname resolves. DESCRIPTION
A context-dependent symbolic link (CDSL) is a special form of a symbolic link, described in ln(1), whose target pathname includes a vari- able ({memb}). The value of {memb} is determined during pathname resolution, making it possible to maintain member-specific configuration and data files within the clusterwide namespace. The mkcdsl command creates a CDSL, effectively making the specified targetname file or directory member-specific. The command simplifies the creation of a CDSL by automatically calculating a default sourcename, which resolves to the default member-specific area in the file system where the CDSL is created. When mkcdsl creates a CDSL, it adds an inventory entry to a clusterwide CDSL inventory file, /var/adm/cdsl_admin.inv. This entry makes it possible for the cdslinvchk command to check CDSLs created by mkcdsl. The mkcdsl -i option updates the inventory file to reflect the cur- rent state of the CDSL by adding, modifying, or removing entries from the CDSL inventory file. In a cluster, when directed to put a file in a member-specific directory (-c or -a), mkcdsl populates both the member-specific directory or directories and the member0 directory. Although you can run mkcdsl from the command line, the mkcdsl command is designed to be non-interactive; it can be called from scripts without requiring user input to complete a task. EXAMPLES
To create a CDSL, /usr/testfile that points to cluster/members/{memb}/testfile: # mkcdsl /usr/testfile # ls -l /usr/testfile ... /usr/testfile -> cluster/members/{memb}/testfile In the previous example, /usr/testfile must not exist. The CDSL is created in /usr and no files are created in any member's /usr/clus- ter/members/{memb} directory. To copy the existing file or directory /usr/testfile1 to this member's /usr/cluster/members/membern directory and replace it with a CDSL that points to cluster/members/{memb}/testfile1: # mkcdsl -c /usr/testfile1 Although the CDSL references all members, only this member has a copy of the original /usr/testfile1 file. To copy the existing file or directory /usr/testfile2 to all members' /usr/cluster/members/{memb} directories and replace it with a CDSL that points to cluster/members/{memb}/testfile2: # mkcdsl -a /usr/testfile2 All members have a copy of the original /usr/testfile2 file. To create a CDSL and explicitly specify the sourcename: # mkcdsl /usr/share/cluster/members/{memb}/testfile3 /usr/share/doclib/testfile3 *** Warning *** The passed source name, '/usr/share/cluster/members/{memb}/testfile3' differs from the calculated source name: cluster/mem- bers/{memb}/testfile3 Using passed source name: '/usr/share/cluster/members/{memb}/testfile3' Because the specified sourcename differs from mkcdsl's calculated default value, the command issues a warning message. Note that mkcdsl makes the CDSL. The mkcdsl command does not exit on a warning message. It will exit for an *** Error *** message unless the -f option is specified. To add an inventory record for an existing CDSL to the /var/adm/cdsl_admin.inv file: # mkcdsl -i /etc/testfile4 To remove a CDSL and then remove its entry from the /var/adm/cdsl_admin.inv file: # rm /etc/testfile4 # mkcdsl -i /etc/testfile4 Note that removing the CDSL and its entry does not remove any files referenced by the CDSL. EXIT STATUS
The exit values for mkcdsl are: Success. Failure. FILES
Specifies the command path. CDSL administrative inventory file. This file will not exist on all systems. SEE ALSO
Commands: ln(1), cdslinvchk(8) Files: local(4) Miscellaneous: hier(5) mkcdsl(8)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy