Removed a file by accident

Knight knightotp at
Sat Oct 9 09:16:26 UTC 2010

> Also how can I find out what package that file belonged to?
> Thanks for any help,
> Steve

Hi Steve,

In order to find out to which package a file belongs you can (out of the
box) use:

dpkg -S /sbin/restart

--- output ---
upstart: /sbin/restart

--- end output ---

The other way around - eg. find all files belonging to a package:

dpkg -L upstart

--- output ---
<snipped a lot>

--- end output ---

There are other programs available which promise more features including
more speed and file size or are able to show md5sums. A quick search for
them brought me to:
Note: I didn't check the Ubuntu repos for the availability of those

Knight Of The Post

Linux Pro or Pro Linux?!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ubuntu-users mailing list