LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-05-2012, 04:41 AM   #1
sajjadpu
LQ Newbie
 
Registered: Apr 2012
Posts: 6
Blog Entries: 2

Rep: Reputation: Disabled
to overwrite a file in root


hi everyone. i installed fedora 16. now i want to ovewrite a file, in root ETC folder. this file is in my home directory. plz suggest me how to make it possible? thanks in anticipation
 
Old 05-05-2012, 06:07 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
First, to "overwrite" any file, just save a document with the same filename. Working in a GUI, you'll typically be prompted to confirm you want to do this. In a terminal, use "mv"

Second, the /etc directory should not be in your /home directory----perhaps you mean that you want to replace a file in /etc with one in /home??
 
Old 05-05-2012, 08:17 PM   #3
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
Quote:
Originally Posted by sajjadpu View Post
hi everyone. i installed fedora 16. now i want to ovewrite a file, in root ETC folder. this file is in my home directory. plz suggest me how to make it possible? thanks in anticipation
sudo mv ~/newfile /etc/oldfile

where newfile is the name of the file in your home directory and old file is the name of the file in the /etc directory
 
Old 05-05-2012, 08:44 PM   #4
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Just my opinion, if you do not know how to copy/move a file to /etc, you should not be messing with files in there.

Quote:
sudo mv ~/newfile /etc/oldfile
Fedora does not use sudo by default, unless specifically installed by the user.
 
Old 05-05-2012, 09:24 PM   #5
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
Just my opinion, if you do not know how to copy/move a file to /etc, you should not be messing with files in there.


Fedora does not use sudo by default, unless specifically installed by the user.
whoops, you're right. I forgot, it's been a while since I used fedora.

sajjadpu, you are going to have to have root privlidges.

while I don't entirely agree with towheedm, His caution is reasonable. You could do a good amount of damage to your system if you are mistakenly overwriting something you shouldn't
On the other hand you are never going to learn to swim if you don't get your feet wet.

what exactly are you replacing? replacing files in etc is not typical.
 
Old 05-05-2012, 10:01 PM   #6
sajjadpu
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by mreff555 View Post
whoops, you're right. I forgot, it's been a while since I used fedora.

sajjadpu, you are going to have to have root privlidges.

while I don't entirely agree with towheedm, His caution is reasonable. You could do a good amount of damage to your system if you are mistakenly overwriting something you shouldn't
On the other hand you are never going to learn to swim if you don't get your feet wet.

what exactly are you replacing? replacing files in etc is not typical.
hi dear.currently i installed fedora 16 on core I3 desktop. after it i was
interested to install xmgrace on it. i installed the following files

fftw2-2.1.5-22.fc15.i686
libpng10-1.0.56-1.fc16.i686
libXp-1.0.0-16.fc15.i686
fftw-3.3-3.fc16.i686
pdflib-lite-7.0.5-1.fc16.i686
grace-5.1.22-9.fc16.i686

then the next step was to replace id.so.comf file having the text

include ld.so.conf.d/*.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/sane
/usr/lib/qt-3.1/lib
/usr/local/lib

in it. the name of old file is also ld.so.conf. the new ld.so.conf file is necessary to overwrite so that xmgrace can start. if you know another method of installing xmgrace then it will give me highly pleasure. thank you very much.
 
Old 05-05-2012, 10:18 PM   #7
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Was this installed via yum? Modifying your ld.so.conf file can have serious effect on other apps.

Just installed it on Fedora 14 and it ran without any manual intervention.
 
Old 05-05-2012, 10:59 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,589

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
Quote:
then the next step was to replace id.so.comf file having the text
you do not replace that file

you run "ldconfig" on the new software ( you BUILT FROM SOURCE )
for rpm's and yum there is NO NEED

also you NEED to be root to do that to the SORRCE BUILT FILES -- NOT the rpm's
see the manual and help page
Code:
su -
ldconfig --help
--- and ----
man ldconfig
and HOW did you install
Quote:
fftw2-2.1.5-22.fc15.i686
libpng10-1.0.56-1.fc16.i686
libXp-1.0.0-16.fc15.i686
fftw-3.3-3.fc16.i686
pdflib-lite-7.0.5-1.fc16.i686
grace-5.1.22-9.fc16.i686
this way ? or some other ?
Code:
yum install fftw libpng10 libXp grace
and why dose one program need both
the old fft2 AND the current fft3

what is it you are installing ?
and what instructions are you using ? xmgrace ?

see the other thread
"problem to install xmgrace on fedora 16 "
https://www.linuxquestions.org/quest...a-16-a-941617/





Please post
The instructions are you using ?
where you cot them
and what it is you are trying to do .

Last edited by John VV; 05-05-2012 at 11:03 PM.
 
Old 05-06-2012, 10:07 PM   #9
sajjadpu
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Blog Entries: 2

Rep: Reputation: Disabled
[QUOTE=John VV;4671405]you do not replace that file

you run "ldconfig" on the new software ( you BUILT FROM SOURCE )
for rpm's and yum there is NO NEED

also you NEED to be root to do that to the SORRCE BUILT FILES -- NOT the rpm's
see the manual and help page
Code:
su -
ldconfig --help
--- and ----
man ldconfig
and HOW did you install

this way ? or some other ?
[code]
yum install fftw libpng10 libXp grace
dear i installed all the files just by clicking on the file and installation started. but now need to replace id.so.conf file but still i am facing problem to replace it. I also used yum instal grace command but again failed.
 
Old 05-06-2012, 10:21 PM   #10
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Quote:
but now need to replace id.so.conf file
Please read the previous posts carefully concerning ld.so.conf.

Quote:
I also used yum instal grace command but again failed.
What was the EXACT error(s)? Could you please post the complete output from:
Code:
su -c "yum install grace"
 
Old 05-06-2012, 10:28 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,589

Rep: Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643Reputation: 2643
Quote:
dear i installed all the files just by clicking on the file and installation started.
so you DID NOT use the RECOMMENDED program "yum" to install prebuilt programs

from the above i am guessing you "double-clicked" on random rpms you just downloaded from some random site
-- if so , not good


to repeat my self ...
WHAT instructions ( if any) are you trying to fallow !
and from WHERE ( a url link please) did you find it ?


Quote:
I also used yum instal grace command but again failed.
we can not help if we do not know just WHAT you did
please post the EXACT commands you tried

it is VERY odd that it failed seeing as grace IS IN the fedora base repo
this should have installed it
Code:
su -
( type in the root password when asked ) 
yum install grace

Last edited by John VV; 05-06-2012 at 10:29 PM.
 
  


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
File Overwrite Recovery Fracker Linux - Newbie 7 03-15-2011 07:47 PM
How do you overwrite the contents of a file without changing the file size? lothario Linux - Software 3 07-13-2010 08:43 AM
using sed to insert line into file and overwrite the current file jadeddog Programming 3 06-11-2009 07:14 PM
how to overwrite a particular line of a file kkpal Linux - Newbie 1 05-16-2008 02:35 AM
Overwrite the ROOT Password ederts Linux - General 1 09-13-2001 05:19 AM

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

All times are GMT -5. The time now is 09:09 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
Open Source Consulting | Domain Registration