From 8735fa6a4b15e91cd703454a320d97c37ac56b99 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Tue, 20 Dec 2022 19:27:15 +1000 Subject: [PATCH] ar: refresh page (#9567) * Refresh descriptions: - add mnemonics - use `specific` term * Fix broken placeholders: wrong format * Replace `.o` with `.ext` * Don't use leading dashes * Apply suggestions from code review --- pages/common/ar.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pages/common/ar.md b/pages/common/ar.md index f2264a63a..522eaf3d9 100644 --- a/pages/common/ar.md +++ b/pages/common/ar.md @@ -1,24 +1,25 @@ # ar -> Create, modify, and extract from archives (`.a`, `.so`, `.o`). +> Create, modify, and extract from Unix archives. Typically used for static libraries (`.a`) and Debian packages (`.deb`). +> See also: `tar`. > More information: . -- Extract all members from an archive: +- E[x]tract all members from an archive: -`ar -x {{path/to/file.a}}` +`ar x {{path/to/file.a}}` -- List the members of an archive: +- Lis[t] contents in a specific archive: -`ar -t {{path/to/file.a}}` +`ar t {{path/to/file.ar}}` -- Replace or add files to an archive: +- [r]eplace or add specific files to an archive: -`ar -r {{path/to/file.a}} {{path/to/file1.o}} {{path/to/file2.o}}` +`ar r {{path/to/file.deb}} {{path/to/debian-binary path/to/control.tar.gz path/to/data.tar.xz ...}}` -- Insert an object file index (equivalent to using `ranlib`): +- In[s]ert an object file index (equivalent to using `ranlib`): -`ar -s {{path/to/file.a}}` +`ar s {{path/to/file.a}}` -- Create an archive with files and an accompanying object file index: +- Create an archive with specific files and an accompanying object file index: -`ar -rs {{path/to/file.a}} {{path/to/file1.o}} {{path/to/file2.o}}` +`ar rs {{path/to/file.a}} {{path/to/file1.o path/to/file2.o ...}}`