LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ar command question! (https://www.linuxquestions.org/questions/linux-newbie-8/ar-command-question-789365/)

ss_me 02-15-2010 10:34 PM

ar command question!
 
Hello Linux users,

I am having problem with the ar cmd. I had already created an archive archive.a with two .o files but I have modified one of them now. How do I replace the old one.o with the new one.o?

I used the ru cmd but it is not working. I don't think I am properly using it, this is how I have it so far:

ar ru archive.a one.o

But this is not working. If anyone has any input it would be great! Thank you!

neonsignal 02-16-2010 02:50 AM

The options are fine. When you say it doesn't work, is it reporting an error? If not, how are you determining if it works or not?

You could also add the 'verbose' flag, so that it will tell you if it replaces the component:
Code:

ar ruv archive.a one.o
Incidentally, the component will only be replaced if it is newer than the existing one.


All times are GMT -5. The time now is 09:12 AM.