Blog O’ Matty

home archives categories links pages meta search

Finding out the file name associated with an inode

Blogged by matty as Solaris Storage — matty Mon 13 Mar 2006 11:30 am

While perusing the logfiles on one of my personal systems a while back, I noticed that an error was generated with the inode of a troublesome file (I can’t recall the specifics). Since the error was rather vague and contained an inode number, I wanted to resolve the inode number to a file name to see which file was making the application angry. There are NUMEROUS way to resolve inode numbers to file names, but my favorite methods involve find and ncheck. To use find to locate the file name associated with an inode, you can pass the inode number to find’s “-inum” option:

$ find /export/home -inum 12345 -ls

If find doesn’t fit your fancy, you can also use the ncheck utility to resolve a file name to an inode:

$ ncheck -i 261
/dev/dsk/c0t0d0s0:
261 /usr/bin/cktime
261 /usr/sadm/bin/errtime
261 /usr/sadm/bin/helptime
261 /usr/sadm/bin/valtime

The find command tends to run significantly faster, but ncheck can be a viable alternative in some cases.

permalink | trackback uri |

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

Name (required)

Mail (will not be published) (required)

Website

7 + 9 × 0 = ?

Archives:

July 2007

June 2007

May 2007

April 2007

March 2007

February 2007

January 2007

December 2006

November 2006

October 2006

September 2006

August 2006

July 2006

June 2006

May 2006

April 2006

March 2006

February 2006

January 2006

December 2005

November 2005

October 2005

September 2005

August 2005

July 2005

June 2005

May 2005

April 2005

March 2005

February 2005

January 2005

December 2004

November 2004

October 2004

0

Links:

Categories:

Apache

Apple & OS X

Articles, Presentations and Certifications

Booting

DNS & BIND

Email

Firefox

FreeBSD Misc

FreeBSD Networking

FreeBSD Utilities

Gnome

GNU Privacy Guard

Hardware

HTTP

Investing

Java

Links

Linux Debugging

Linux Installation

Linux Kernel

Linux LVM

Linux Misc

Linux Networking

Linux Package Management

Linux performance

Linux Recovery

Linux Security

Linux Storage

Linux Utilities

Linux Virtualization

Monitoring

Music

MySQL

Networking

NFSv3

OpenBSD Kernel

OpenBSD Misc

OpenBSD Networking

OpenBSD Ports

OpenBSD Security

OpenBSD Utilities

OpenLDAP

OpenSSH

OpenSSL

Perl

Postfix

Procmail

Rants

Samba

Security

Sendmail

Service providers

Smartmontools

Snort

Software

Solaris Cluster

Solaris Debugging

Solaris DTrace

Solaris Fault Management

Solaris Kernel

Solaris Linker

Solaris Live Upgrade

Solaris Misc

Solaris Networking

Solaris NFS

Solaris Patching

Solaris Recovery

Solaris Resource Management

Solaris Security

Solaris Shell

Solaris SMF

Solaris Storage

Solaris Utilities

Solaris Volume Manager

Solaris Xen

Solaris ZFS

Solaris Zones

Storage Area Networking

Sun Directory Server

Sun Web Server

UNIX

UNIX Shell

Veritas File System

Veritas Netbackup

Veritas Volume Manager

Vertias Cluster Server

VMWare ESX Server

VOIP

Web Technologies

Windows Misc

Windows Utilities

Wireless

Wordpress

Meta:

Login

RSS

Comments RSS

Powered by wordpress and the back in black theme