1751692 Members
4893 Online
108781 Solutions
New Discussion

Re: ghosty file !!!!

 
SOLVED
Go to solution
Kuntal Gupta
Frequent Advisor

ghosty file !!!!

Dear HP-UX lovers,

 

Pls find the comand o/p first:

 

uerr1>ll
total 453024
drwxr-xr-x   2 bin        bin             96 Nov 18  2010 ac
crw-rw-rw-   1 root       root        72 0x000004 Nov 14  2010 arp
crw-rw----   1 sybase     bin        101 0x000004 Jan 27  2010 async
crw-rw-rw-   1 bin        bin        101 0x000000 Oct 15  2009 asyncdsk
crw-rw-rw-   1 bin        bin        168 0x000000 Oct 16  2009 beep
..........................................................

 

.........................................................

drwxr-xr-x   2 bin        bin             96 Nov 18  2010 rchgr
drwxr-xr-x   2 bin        bin           8192 Sep  2 19:46 rdisk
-rw-rw-rw-   1 root       sys        231822848 Jan 21  2010 rdj  <<----Note this file
drwxr-xr-x   2 bin        bin          16384 Sep  2 19:46 rdsk
drwxr-xr-x   2 bin        bin           8192 Nov 18  2010 rmt
........................................................

......................................................

crw-r--r--   1 root       sys         97 0x000000 Oct 15  2009 vxportal
crw-rw-rw-   1 bin        sys          3 0x000004 Oct 15  2009 zero
uerr1>pwd
/dev
uerr1>ll rdj
rdj not found << ------------------------ Fishy!!
uerr1>du -ks /dev/*|sort -rn|head -10
226392  /dev/rdj
48      /dev/dblinks
40      /dev/vx
.....................
8       /dev/ptym
uerr1>

 

Quarry:

 

What might be the reason?

 

I have tried to move the file to /tmp also, but it is not happening.

 

Pls comment

 

Regards...

 

Kuntal

6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: ghosty file !!!!

Hi:

 

It is likely that the file name contains unprintable characters so that it's name isn't simply "rdj".  There are several things you can doto see/move/remove the file:

 

# ls -l -i -b /dev

 

...which wiil show the inode in the first column and show any non-printing characters in octal notation.

 

Now you could do things like:

 

# rm -i /dev/rdj*

 

...and respond "y" if this is what you want to do; or:

 

# find /dev -xdev -type f -inum <inum_of_file> -exec rm {} \;

 

...to remove the file by its inode (which is unique within a filesystem, so use '-xdev' to inhibit crossing out of the filesystem.

 

Regards!

 

...JRF...

Kuntal Gupta
Frequent Advisor

Re: ghosty file !!!!

Dear JRF-Sir,

 

I do always admire your reply.

 

... and show any non-printing characters in octal notation. << ---- Pls describe in brief to update my knowledge.

 

Why this type of file is created?

 

uerr1>ls -l -i -b /dev
total 453024
  3973 drwxr-xr-x   2 bin        bin             96 Nov 18  2010 ac
   782 crw-rw-rw-   1 root       root        72 0x000004 Nov 14  2010 arp
 
.......................................................................
........................................................................
  4458 drwxr-xr-x   2 bin        bin             96 Nov 18  2010 rchgr
   910 drwxr-xr-x   2 bin        bin           8192 Sep  2 19:46 rdisk
   956 -rw-rw-rw-   1 root       sys        231822848 Jan 21  2010 rds\010j  << -----------The file
   855 drwxr-xr-x   2 bin        bin          16384 Sep  2 19:46 rdsk
   935 drwxr-xr-x   2 bin        bin           8192 Nov 18  2010 rmt
  ......................................................................
........................................................................
   977 crw-r--r--   1 root       sys         97 0x000000 Oct 15  2009 vxportal
  1020 crw-rw-rw-   1 bin        sys          3 0x000004 Oct 15  2009 zero
uerr1>

 

Hope deletion of this file will not effect the system functionality?

 

 

Warm Regards...

 

Kuntal

 

 

 

James R. Ferguson
Acclaimed Contributor
Solution

Re: ghosty file !!!!


@Kuntal Gupta wrote:

... and show any non-printing characters in octal notation. << ---- Pls describe in brief to update my knowledge.

 

Why this type of file is created
 
   956 -rw-rw-rw-   1 root       sys        231822848 Jan 21  2010 rds\010j  << -----------The file

Hope deletion of this file will not effect the system functionality?



Files like this get created when you "fat-finger" the keyboard or, in this case use the backspace key without having defined it for use properly with 'stty'.

 

Since the file in question resides in the '/dev' filesystem and the file is a regular file (i.e. not a character or block device file) you can be virtually assured that is has no place there.  You can always look at it before you remove it with "cat' or "od".  Perhaps it is something you do want, just not in the device filesystem.

 

Regards!

 

...JRF...

Kuntal Gupta
Frequent Advisor

Re: ghosty file !!!!

Dear JRF-Sir,

 

Thanks a lot for your reply.

 

 

# rm -i /dev/rdj*   << ------  Didn't

 

BUT

 

# find /dev -xdev -type f -inum <inum_of_file> -exec rm {} \;

WORKED sucessfully.

 

There is no issue in the system performance.

 

Warm Regards...

 

Kuntal

 

 

James R. Ferguson
Acclaimed Contributor

Re: ghosty file !!!!

Hi (again):

 

I'm happy to have helped.  In this new community, marking a post as solved does not automatically generate a Kudo.  Please see:

 

http://h30499.www3.hp.com/t5/help/faqpage/faq-category-id/kudos#kudos

 

Regards!

 

...JRF...

Dennis Handly
Acclaimed Contributor

Re: ghostly file, unprintable chars

>-rw-rw-rw-   1 root       sys        231822848 Jan 21  2010 rdj

 

Most likely this may be a tarfile?  As JRF said, it was created by a typo using /dev/rdj (backspace).