LinuxQuestions.org
Review your favorite Linux distribution.
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 02-15-2010, 11:34 PM   #1
ss_me
LQ Newbie
 
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
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!
 
Old 02-16-2010, 03:50 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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.

Last edited by neonsignal; 02-16-2010 at 03:53 AM.
 
  


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
du command question mokku Linux - Newbie 4 07-16-2008 10:48 AM
mv command question skilletlicker Linux - General 2 02-03-2006 02:22 PM
Command question satimis Linux - Newbie 2 11-24-2004 09:59 AM
Command Question gauge73 Linux - Newbie 2 02-13-2003 09:18 PM
ls -al command question Stingreen Linux - Networking 5 02-14-2002 12:32 PM

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

All times are GMT -5. The time now is 10:05 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