PDA

View Full Version : replacing file in /bin



stoneringers
7th December, 2010, 11:45 AM
I need to replace a file in /bin which is read only. How do I change it so that I can delete the old version of the file and replace it with a new one.
Many thanks.

GastonJ
11th December, 2010, 11:08 AM
rm -f file
as root of course

Hairlocks
20th December, 2010, 10:38 PM
Why do you need to replace a file in /bin and which one is it. You could quite easily break it by just trying to replace it, e.g. what library fils does the new one need, etc...

Mjolinor
20th December, 2010, 11:18 PM
There shouldn't be a need to replace it, just copy your new one in there with a different name. Unless you are calling it from something else in which case you should rename the original.

GastonJ
22nd December, 2010, 12:25 AM
He may not be using /usr/local/bin and it could well be a script or binary of his own making :) or just breaking his system..

stoneringers
27th December, 2010, 06:32 PM
Why do you need to replace a file in /bin and which one is it. You could quite easily break it by just trying to replace it, e.g. what library fils does the new one need, etc...

I started out by wanting to put a new version of cccam onto my 500s.
The current version was in /bin which I wanted to replace with a newer version. I expected that executable would be in /var/bin but it was not. I got around the problem by letting the image auto up date the cam itself. It reminded me of the problem that you have replacing executables in read-only mounted file systems.
As it was about 20 years since I had worked on unix system at work, I could not remember the way around it.