LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-18-2006, 10:07 AM   #1
cake81
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian
Posts: 7

Rep: Reputation: 0
Deleted ls by accident


A little too quick at typing and switching through terminals, and ls in the /bin directory was gone. Is there a way to restore the ls command?
 
Old 01-18-2006, 10:26 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
I'm not positive, but you should be able to simply reinstall the 'coreutils' package using apt. This is the package containing most GNU command utilities such as cp, ls, chmod, cat, etc...
 
Old 01-18-2006, 10:40 AM   #3
cake81
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, it worked out with the reinstall :-)

To whom it may concern, command used as root was:

apt-get install --reinstall coreutils

Last edited by cake81; 01-18-2006 at 11:04 AM.
 
Old 01-18-2006, 11:03 AM   #4
morrolan
Member
 
Registered: Sep 2003
Location: Manchester UK
Posts: 264

Rep: Reputation: 30
The normal way, is at a terminal (as root) type:
Code:
#  apt-get install coreutils
I don't know if that will upgrade it (doubt it) but it might be a bad idea to remove coreutils (apt-get remove coreutils btw).

I'm sure that there is a "force" option to force the reinstall of coreutils - there is the ability in Synaptic anyway.
 
Old 01-19-2006, 04:01 AM   #5
morrolan
Member
 
Registered: Sep 2003
Location: Manchester UK
Posts: 264

Rep: Reputation: 30
For anyone who finds this thread - follow what cake81 found out above, i.e.

apt-get install --reinstall coreutils

Please do not follow my advice, as this is a much safer bet if you accidentally delete a core command!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chsh accident; big accident. shinystuffrox *BSD 3 06-06-2005 07:06 AM
Kmail crashes when deleted mail is deleted dufferin Slackware 0 03-21-2005 03:23 PM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
Measures for accident!? Rex_chaos Linux - General 1 09-25-2001 12:12 PM
deleted cdrom by accident chronos Linux - General 1 12-16-2000 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration