Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File type Socket

Status
Not open for further replies.
Jan 20, 1999
99
ES
I have a number of files that are impossible to delete. In most cases they have the file type "socket" (in properties). Does anyone know how to get rid of them?

John Connolly
 
Hi,

A socket 'file' is merely a connection between two processes - either raw or tcp. If you do (as root) the command '/usr/sbin/lsof' (list open files) you will see that most of the open 'files' are in fact sockets. You do not want to delete such 'files'.

However, if there are any old socket files lying around you should be able to remove them as root with the -f (force) flag to rm.

rm -f whatever

Regards



 
I'm sure these files aren't real "sockets" - they have filenames matching data files for applications we run, they appear to be 4GB each and have silly dates like 1925, 2037, etc.

I'll try rm -f and see what happens.

John
 
Then why did you say they were sockets???

What does file whateverthisfileiscalled

say ?

Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi,

File Manager "Properties" says they're sockets. They have the following filenames:

1.gra
14.fil
53.lin
1.tl
5.tl

These are all data file names used by our animation system.

I tried rm -f to delete them and got "permission denied".

John Connolly

 
Hi,

Hmmm... don't recognise those at all - What does a 'ls -l' say for those files ?

Regards

 
Hi,

I wouldn't expect many people to recognise the file names - they're used by Animo 2D animation colour and composition software. Anyway, ls -l says:

brws-wsrwx 1 57518 27871 176, 114 Oct 3 2025 1.gra
srw---S--T 1 33003 49273 4294967295 Nov 28 1938 14.fil

John
 
The .gra file is a block device with major 176 and minor 114.
The .fil is a semaphore, not a socket.

Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi,

Oh, right, all great stuff but how does it help me get rid of the files? They cause some confusion as they're sitting in our production data folders. Even worse, the machine is a server and if anyone on our LAN clicks on one of them it crashes their system!

John
 
Hi,

There is no standard block device on linux with major 176 . Both the files shown are no doubt created by the Animo s/w for some purpose and I'd suggest you ask them for some explanation before trying to remove. For max info on a file you can use the 'stat' command :

$ stat 1.gra
(etc.)

Regards
 
Hi,

I've checked with the s/w supplier. The names such as .gra and .fil are quite normal parts of the graphics files that make up an animation level. If we no longer need that data then we can just delete them. The problem is that we can't. I get "permission denied" even when I'm logged on as root.

John
 
John

just a suggestion, have you tried to change permissions, chmod 777 <filename>, chgrp user <filename>, chown root <filename>. try mv <filename> to another location or mv <filename> to <newfilename>

Hope this helps, also try man pages

Funstur
 
Hi,

chmod, chgrp, chown and mv all fail with &quot;Operation not permitted&quot;.

John
 
Hi,





Yes .. chattr...thats what I was trying to remember (had this scenario before once).





Regards
 
Hi,

Thanks for the suggestion. Tried chattr -i on two of the files and got:

&quot;No such device while reading flags on 1.gra&quot;

and

&quot;Inappropriate ioctl for device while reading flags on 14.fil&quot;

Any other ideas?

John
 
I guess at this point I'd be running debugfs to try and see what on earth is really going on here. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Hi,

debugfs - never tied using that. Just read the man pages - looks dangerous...

Should the machine be in single user mode when running debugfs?

John
 
Probably wouldn't be a bad idea to have it single user, depending upon what you are about to do, of course. Just looking, no need. Changing stuff- I would. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top