LinuxQuestions.org
Visit Jeremy's Blog.
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-31-2012, 03:45 AM   #1
Soraya
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Deleted Files by Mistake


I am using Ubuntu 11.04 (natty), 64-bit kernel

Accidentally I wrote:
>cd /usr/bin
>sudo rm cc gcc c++ g++
>sudo ln -s gcc-4.0 cc
>sudo ln -s gcc-4.0 gcc
>sudo ln -s c++-4.0 c++
>sudo ln -s g++-4.0 g++

How can I undo this? I want everything as before. Thank you.
 
Old 01-31-2012, 03:51 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,635

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
Welcome to LQ.

sudo apt-get install --reinstall gcc g++
... should install the correct files and redo the links.

Can be tested with : 'gcc -v', 'cc -v', 'g++ -v', c++ -v'
to check versions.

.
 
1 members found this post helpful.
Old 01-31-2012, 03:52 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
I would just use apt-get / synaptic / whatever gui, to reinstall the packages. Much less messing about that trying to recover the files.

Nothing at all to do with programming. Moved to Linux - Newbie.
 
1 members found this post helpful.
Old 01-31-2012, 03:53 AM   #4
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 702

Rep: Reputation: 423Reputation: 423Reputation: 423Reputation: 423Reputation: 423
Hi.

Try
Code:
$ sudo apt-get install gcc g++ --reinstall
EDIT: I'm late..
 
1 members found this post helpful.
Old 02-01-2012, 09:06 AM   #5
Soraya
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you "acid_kewpie", better with "synaptic", everything is ok
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] I have deleted crontab by mistake riganta Slackware 10 10-25-2010 01:41 PM
Big Newbie Mistake...Deleted account, need files back cwwilson721 Slackware 10 10-22-2009 12:01 PM
deleted by mistake .thunderbird valemon Linux - General 6 08-28-2007 05:12 PM
Am i done for? Deleted /etc by mistake AriciU Slackware 10 07-07-2007 06:07 AM
Deleted rc.local by mistake Fredstar *BSD 4 06-18-2007 08:44 AM


All times are GMT -5. The time now is 04:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration