Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > A question about replacing system level files

A question about replacing system level files
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Sep 11, 2004, 05:11 PM
 
Dear macnn,

I am making a program that needs to replace system-level files with a different file that is named the same as the system file. Can you please tell me what the terminal command for this is?



Thanks in advanced,
NaintoFaren
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 11, 2004, 07:44 PM
 
It's called ifyoudontknowhowtodothisyoushouldntbedoingit.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Sep 11, 2004, 10:13 PM
 
Originally posted by Naintofaren:
Dear macnn,

I am making a program that needs to replace system-level files with a different file that is named the same as the system file. Can you please tell me what the terminal command for this is?



Thanks in advanced,
NaintoFaren
rm and cp don't work (note that I agree with the above poster that if you can't figure out how to do this you shouldn't be doing it, and probably not even if you can)?
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 12, 2004, 04:46 AM
 
Originally posted by Chuckit:
It's called ifyoudontknowhowtodothisyoushouldntbedoingit.
     
Fresh-Faced Recruit
Join Date: Jul 2004
Status: Offline
Reply With Quote
Sep 12, 2004, 11:38 AM
 
I have an understanding of how. I think its sudo ditto (thefiledirectory) (thefiledirectory) right?

I forgot to post this. I do know how im just makin sure?
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Sep 12, 2004, 12:17 PM
 
Originally posted by Naintofaren:
I have an understanding of how. I think its sudo ditto (thefiledirectory) (thefiledirectory) right?

I forgot to post this. I do know how im just makin sure?
Firstly, what "system level file" do you want to replace? You should not replace system level files unless you're Apple.

Secondly, if you want to do this from an application read the following documentation:
Performing Privileged Operations With Authorization Services
TN2095: Authorization For Everyone
Authorization Services Reference
Security Objective-C API Reference

And look at the following sample code:
MoreAuthSample
AuthForAll
AuthSample

As you can see, this is a non-trivial operation and not something that should be undertaken lightly.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 12, 2004, 12:36 PM
 
Originally posted by Naintofaren:
I have an understanding of how. I think its sudo ditto (thefiledirectory) (thefiledirectory) right?
I reiterate: If you don't have the skill to figure this out yourself, you should not be doing it at all. Anybody qualified to muck around with system files won't have to ask.

This is a bit like saying, "What's the longest I can submerge a baby in water without killing it? I think it's 30 seconds, right?" If you have any business submerging a baby (and there aren't many legitimate activities that involve doing so), you should already know what you're doing.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2