Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

migrated from stackoverflow.com Mar 1 '13 at 18:21

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

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 ;)

share|improve this answer
4  
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. –  Rafał Cieślak Mar 1 '13 at 18:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.