LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 04: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, 04:51 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,738

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
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, 04:52 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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, 04:53 AM   #4
firstfire
Member
 
Registered: Mar 2006
Location: Ekaterinburg, Russia
Distribution: Debian, Ubuntu
Posts: 705

Rep: Reputation: 425Reputation: 425Reputation: 425Reputation: 425Reputation: 425
Hi.

Try
Code:
$ sudo apt-get install gcc g++ --reinstall
EDIT: I'm late..
 
1 members found this post helpful.
Old 02-01-2012, 10: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 02:41 PM
Big Newbie Mistake...Deleted account, need files back cwwilson721 Slackware 10 10-22-2009 01:01 PM
deleted by mistake .thunderbird valemon Linux - General 6 08-28-2007 06:12 PM
Am i done for? Deleted /etc by mistake AriciU Slackware 10 07-07-2007 07:07 AM
Deleted rc.local by mistake Fredstar *BSD 4 06-18-2007 09:44 AM

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

All times are GMT -5. The time now is 09:00 PM.

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