Operating System - HP-UX
1837377 Members
3407 Online
110116 Solutions
New Discussion

Re: log file listed 3 times

 
SOLVED
Go to solution
Jerry Sommerville_2
Frequent Advisor

log file listed 3 times

I have a strange one. I am running HP-UX 11.00 and when I do a "ls -l /var/opt/resmon/log/event.log" I get the following output:
-rw-r--r-- 1 root root 98904 May 13 07:39 /var/opt/resmon/log/event.log

However, when I do a simple "ls -l" from that directory, this is what I see:

jsommerv@corp64 /var/opt/resmon/log >ls -l
total 1456
lrwxr-xr-x 1 root sys 27 Jan 24 2001 api.log -> /etc/opt/rg
lrwxr-xr-x 1 root sys 30 Jan 24 2001 client.log -> /etc/opg
-rw-r--r-- 1 root root 98904 May 13 07:39 event.log
-r--r----- 1 root root 500309 May 2 14:33 event.log1
-rw-r--r-- 1 root root 68212 May 13 07:39 event.log
lrwxr-xr-x 1 root sys 33 Jan 24 2001 registrar.log -> /etcg
-rw-r--r-- 1 root root 68212 May 13 07:39 event.log
jsommerv@corp64 /var/opt/resmon/log >


Event.log is listed 3 times! What gives?
4 REPLIES 4
Stephen Keane
Honored Contributor
Solution

Re: log file listed 3 times

Probably hidden characters (unprintable) try

# ls -l | cat -v

Steven E. Protter
Exalted Contributor

Re: log file listed 3 times

Two of the listings are the same file.

The top or third listing is a little mysterious.

What I suspect is a circular soft link created by the ln -s command.

I can't tell from what I see where that is.

If the system can be booted, I'd like to see this output after a boot.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
john korterman
Honored Contributor

Re: log file listed 3 times

Hi,
as Stephen pointed out it is probably a case of unprintable chars. They can also be listed by:
# ls -lb
where the unprintable appears in octal notation. It is probably more difficult to figure out how the files got there.

regards,
John K.
it would be nice if you always got a second chance
Jerry Sommerville_2
Frequent Advisor

Re: log file listed 3 times

Thanks Stephan and John - you guys hit the nail on the head. Points assigned.

:-)