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
pull/1/head
Emily Grace Seville 2022-12-20 19:27:15 +10:00 committed by GitHub
parent cf93879231
commit 8735fa6a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 11 deletions

View File

@ -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: <https://manned.org/ar>.
- 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 ...}}`