Sponsored Content
Full Discussion: inode table location ??
Top Forums UNIX for Advanced & Expert Users inode table location ?? Post 302136029 by varungupta on Friday 14th of September 2007 07:27:02 AM
Old 09-14-2007
Error

Quote:
Originally Posted by Perderabo
The mountpoint is where the filesystem gets mounted. Run a command like "df -k" which should give you a list of filesystems. Each line will have a directory which is the mountpoint. If the inode numbers do not match, you have the wrong files. Use that find command to locate the file which matches a particular inode number.

You don't say what os you are using. My fuser does not have -V and it does not display inode numbers. To get more info on your fuser, use the command "man fuser" and read the man page. My fuser man page says stuff like "c file is its current directory". The output you show has c on the lines, it looks like you may be dealing with current directories. But I would expect pid's rather that inode numbers. Your fuser is not like mine and you have provided so few details that I really cannot help you here.

The current directory is controlled by the cd command in the shell. If I type "cd /local/local/bin", then /usr/local/bin becomes my current directory and fuser would show the inode of /usr/local/bin in the output.


Hey,

I am using AIX5.2.
And in "man fuser", it has -V and -c options.
fuser [ -c | -d | -f ] [ -k ] [ -u ] [ -x ] [ -V ]File ...
The fuser command lists the process numbers of local processes that use the local or remote files specified by the File parameter. For block special
devices, the command lists the processes that use any file on that device.

Each process number is followed by a letter indicating how the process uses the file:
c Uses the file as the current directory.
e Uses the file as a program's executable object.
r Uses the file as the root directory.
s Uses the file as a shared library (or other loadable object).

Flags
-V Provides verbose output.
-c Reports on any open files in the file system containing File.
-u Provides the login name for local processes in parentheses after the process number.
-f Reports on open instances of File only.
-x Used in conjunction with -c or -f, reports on executable and loadable objects in addition to the standard fuser output.

As I have said, i am using command (given below)
fuser -uV /clocal/mqbrkrs/user/mqsiadm/sanjay

And it shows the o/p (given below)
/clocal/mqbrkrs/user/mqsiadm/sanjay:
inode 569506c(t9154r0)
inode 577710c(mqsiadm)
inode 1044732c(mqsiadm)
inode 1155126c(mqsiadm)

Now, for example 569506 is the process no. that uses a file in the current directory (c). Now how would I map the name of the file in the current directory, which is used by the process whose process id is 569506 ?? In simple terms I want the name of the file which is being used !!

Hope you get this !!

Can we map process no. in "ps" table ?? From there i would get the name of the file or not corrosponding to that process no. which i have got from fuser command??

Any light on this ???Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

copy files from one location to similar location

I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure, say location 1, /home/rick/tmp_files/1-12/00-25/ here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies

2. Shell Programming and Scripting

Transfer files from one location to another location

Hi, i have to transfer of files of User1 located in Location1 to user2 located in Location2 using shell script. Please suggest me. (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

3. Shell Programming and Scripting

Put one string from one location to another location in a file

Hi Everyone, I have 1.txt here a b c' funny"yes"; d e The finally output is: here a b c d e' funny"yes"; (1 Reply)
Discussion started by: jimmy_y
1 Replies

4. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

5. Shell Programming and Scripting

Help on Moving files from one location to another location

Hi, I am new to unix and shell scripting. Please help me in resolving the below issue. In my shell script I have a variable which stores the different files with the path. Now I need to move all the files one by one to another location. ---- 1.... (4 Replies)
Discussion started by: kpagadala
4 Replies

6. Solaris

inode table in sun solaris

Hi, I would like to is it possible to repair inode table in solaris without running fsck? I am facing this issue in root file system, because to run fsck I have to bring system in single user mode with booting cdrom media. I facing strange issue in /var/adm/messages it is showing inode table... (12 Replies)
Discussion started by: manoj.solaris
12 Replies

7. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies

8. Shell Programming and Scripting

How to copy a file from one location to another location?

I have file file1.txt in location 'loc1'. Now i want a copy of this file in location 'loc2' with a new file called test.txt. Please help me how to do this in shell script. (1 Reply)
Discussion started by: vel4ever
1 Replies

9. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

10. Shell Programming and Scripting

Help with copying the list of files from one location to other location

A) I would like to achive following actions using shell script. can someone help me with writing the shell script 1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using find . -name "*" -print | xargs grep -li 1367A49001CP0162 >... (1 Reply)
Discussion started by: GG2
1 Replies
matchpathcon_checkmatches(3)				     SELinux API documentation				      matchpathcon_checkmatches(3)

NAME
matchpathcon_checkmatches, matchpathcon_filespec_add, matchpathcon_filespec_destroy, matchpathcon_filespec_eval - check and report whether any specification index has no matches with any inode. Maintenance and statistics on inode associations SYNOPSIS
#include <selinux/selinux.h> void matchpathcon_checkmatches(char *str); int matchpathcon_filespec_add(ino_t ino, int specind, const char *file); void matchpathcon_filespec_destroy(void); void matchpathcon_filespec_eval(void); DESCRIPTION
matchpathcon_checkmatches() checks whether any specification has no matches and reports them. The str argument is used as a prefix for any warning messages. matchpathcon_filespec_add() maintains an association between an inode ino and a specification index specind, and checks whether a conflict- ing specification is already associated with the same inode (e.g. due to multiple hard links). If so, then it uses the latter of the two specifications based on their order in the file context configuration. Returns the specification index used or -1 on error. matchpathcon_filespec_destroy() destroys any inode associations that have been added, e.g. to restart for a new filesystem. matchpathcon_filespec_eval() displays statistics on the hash table usage for the inode associations. RETURN VALUE
Returns zero on success or -1 otherwise. SEE ALSO
selinux(8), matchpathcon(3), matchpathcon_index(3), freecon(3), setfilecon(3), setfscreatecon(3) sds@tycho.nsa.gov 21 November 2009 matchpathcon_checkmatches(3)
All times are GMT -4. The time now is 02:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy