listing files in solaris with inode number [message #475020] |
Fri, 10 September 2010 17:07 |
oradbaexp
Messages: 16 Registered: January 2009
|
Junior Member |
|
|
Hi
SunOS 5.8 Generic sparc
cat /etc/release
Solaris 8
To list the files in a directory, ls -lrt is not giving the file name and location.I gave switch "-i" , in case it is inode number,but still no file name.
Can you please suggest any other command or any work around?
OR how to convert these numbers into name and location of files?
======
ls -lrti
total 24184
5257431 -r--r--r-- 1 aptest1 aatest1 11264 Sep 16 1999 5
3160279 -r--r--r-- 1 aptest1 aatest1 11776 Sep 16 1999 3
6306007 D--------- 1 root root 0 Dec 18 2007 6
14551 p--------- 0 aptest1 aatest1 0 Mar 20 02:28 0
7354583 s--------- 0 root root 0 Sep 10 16:00 7
.
.
.
======
Thanks In advance.
Regards..
|
|
|
Re: listing files in solaris with inode number [message #475023 is a reply to message #475020] |
Fri, 10 September 2010 17:19 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
First, this has nothing really to do with Oracle, but:
How sure are you that you are not in a directory with files named "5" "3" "6" "0" and "7"
Post the FORMATTED (Read "How to format your post" section in the Forum FAQ) output of "ls -l" and "ls -li" like I did in this example, so that we can actually see which columns align:
starfury temp # ls -l
total 0
-rw-r--r-- 1 root root 0 Sep 11 00:14 bar
-rw-r--r-- 1 root root 0 Sep 11 00:14 foo
-rw-r--r-- 1 root root 0 Sep 11 00:14 hey
-rw-r--r-- 1 root root 0 Sep 11 00:15 ugh
starfury temp # ls -li
total 0
1218920 -rw-r--r-- 1 root root 0 Sep 11 00:14 bar
1218918 -rw-r--r-- 1 root root 0 Sep 11 00:14 foo
1218922 -rw-r--r-- 1 root root 0 Sep 11 00:14 hey
1218924 -rw-r--r-- 1 root root 0 Sep 11 00:15 ugh
starfury temp #
|
|
|
Re: listing files in solaris with inode number [message #475024 is a reply to message #475023] |
Fri, 10 September 2010 17:48 |
oradbaexp
Messages: 16 Registered: January 2009
|
Junior Member |
|
|
Thanks Thomas for update.
Actually the original command is something like this
cd /proc/2345/fd
ls -lrti
====
The process 2345 is oracle concurrent manager process.So, it was supposed to list the files ( log files etc.)it is accessing. But in this server, i am not getting the names. The name of files are standard , so i am 99.99% sure that "5","3","6" might not be the name of file.
Regards..
|
|
|
|
Re: listing files in solaris with inode number [message #475026 is a reply to message #475025] |
Fri, 10 September 2010 18:08 |
oradbaexp
Messages: 16 Registered: January 2009
|
Junior Member |
|
|
ls -l /proc/2345/fd
total 54768
p--------- 0 aptest1 aatest1 0 Mar 20 02:28 0
--w------- 1 aptest1 aatest1 6181812 Jul 19 23:41 1
--w------- 1 aptest1 aatest1 21003563 Sep 10 18:04 2
-r--r--r-- 1 aptest1 aatest1 11776 Sep 16 1999 3
s--------- 0 root root 0 Mar 20 02:30 4
-r--r--r-- 1 aptest1 aatest1 11264 Sep 16 1999 5
D--------- 1 root root 0 Dec 18 2007 6
s--------- 0 root root 0 Sep 10 18:04 7
-r--r--r-- 1 aptest1 aatest1 600064 Feb 17 2004 8
-r--r--r-- 1 aptest1 aatest1 153600 Feb 17 2004 9
=====
might i am missing somewhere.
Does this have something to do with terminal size?
I gave stty column 120
Still same output.
Regards..
|
|
|
Re: listing files in solaris with inode number [message #475027 is a reply to message #475025] |
Fri, 10 September 2010 18:21 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
OK, something is seriously wrong. If it really is the dynamic /proc view, then that process would have to be running since September 1999, but Solaris 8 was only released in February 2000.
Did you do something that clobbered other files into the dynamic /proc views from some other source? Like restore some backup that was taken of the entire root directory?
That's definitely something for a Solaris person to look into.
And why is your post still not formatted?
|
|
|
Re: listing files in solaris with inode number [message #475028 is a reply to message #475027] |
Fri, 10 September 2010 18:29 |
oradbaexp
Messages: 16 Registered: January 2009
|
Junior Member |
|
|
Thanks to all
that 1999, i think shows when last time the file was modified
$uptime
6:23pm up 174 day(s), 16:11, 2 users, load average: 1.85, 2.30, 2.35
=====
So, might be some restore,backup,upgrade might have happen.But, these files are standard files with standard file names.
Regards..
|
|
|
Re: listing files in solaris with inode number [message #475029 is a reply to message #475028] |
Fri, 10 September 2010 18:38 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
The problem is, it's not really a "file", it's procfs, which shows information about running processes.
They don't have a "standard file names", they are created dynamically when a new process starts, and go away when the process ends. (also, the permissions are completely wrong as far as I can see).
This box is broken, someone has to find out who broke it and why, and I don't think you know enough to do that. So talk to whatever person is responsible for your Unix server.
|
|
|
|
|