Removed a file by accident
wayward4now at gmail.com
Sun Oct 10 21:17:36 UTC 2010
On Sun, 2010-10-10 at 16:57 -0300, Marcelo Magno T. Sales wrote:
> Em sábado 09 outubro 2010, Knight escreveu:
> > On Sat, 2010-10-09 at 09:15 -0500, C de-Avillez wrote:
> > > On Sat, 09 Oct 2010 11:16:26 +0200
> > >
> > > Knight <knightotp at gmail.com> wrote:
> > > > In order to find out to which package a file belongs you can (out
> > > > of the box) use:
> > > >
> > > > dpkg -S /sbin/restart
> > >
> > > dpkg only searches on installed packages. A more generic search can
> > > be done via 'apt-file'. To install it, 'sudo apt-get install
> > > apt-file'.
> > Sorry first paragraph has typo's.
> > Should be:
> > And you want to tell me that you have files on your computer that you
> > didn't install and that don't belong to any packages or are _not_
> > placed there by yourself or your users? (I cannot think of any on my
> > own systems)
> No, it is the other way around. The OP said he had removed the file
> accidentally. So, the file was not there anymore and therefore dpkg
> could not tell you the package which had installed that file.
But, the original package wasn't removed, so shouldn't it be able to
tell him?? Of course, he could just hunt around using synaptic /
properties. I'm gonna have to dig here, but I found a dpkg command line
that would restore a missing file if the package name was known. From
what I dimly recall the command was similar to rpm --force. Gads, I
better find that link to explain better, but it seems that dpkg will not
install or update a missing file, unless explicitly told to. The command
line to make it do so was a real finger twister. Ric
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
Linux user# 44256
More information about the ubuntu-users