1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-07 15:46:02 +02:00

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
This commit is contained in:
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

View file

@ -1,24 +1,25 @@
# ar # 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>. > 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 ...}}`