Ar

From Devpit
Jump to: navigation, search

investigate the contents of an archive

ar -t /usr/lib/nptl/libpthread.a

extract an item from an archive

The following example extracts the object file pthread_create.o from /usr/lib/nptl/libpthread.a

ar -x /usr/lib/nptl/libpthread.a pthread_create.o

insert an item into an archive

The following example inserts the object file pthread_create.o into /usr/lib/nptl/libpthread.a

ar -cru /usr/lib/nptl/libpthread.a pthread_create.o