6

I am using Ubuntu 12.04 X64, I deleted my /usr/bin/env file by mistake. How could I restore this?

Also I copy a file as /usr/bin/dev, I don't know if I originally had a file called /usr/bin/dev. If so, how could I restore this as well?

0

2 Answers 2

9

The /usr/bin/env file originates from the coreutils package. To restore it, simply reinstall this package. In order to do so, run this command:

sudo apt-get install --reinstall coreutils

There is currently no package in Ubuntu repositories which provides a /usr/bin/dev file. Therefore you don't need to restore it.

1
  • Thanks... it worked in Centos 7 as well with: # yum reinstall coreutils
    – Arfeen
    Oct 3, 2018 at 15:26
1

you can have the file back by asking for people who have the same architecture as yours ( not including me:( ) to give you the same file. then you must put it back as user root and give it permission 755.

I don't have any file on my freshly installed Ubuntu as /usr/bin/dev ;)

1
  • 6
    Manually placing a very essential binary file in your system may be very dangerous, avoid this unless you trust the file's source fully! Also, it may lead to significant problems in case you mistakenly use another (either newer or older) version of this file that you deleted. Mar 1, 2013 at 18:34

Not the answer you're looking for? Browse other questions tagged .