ar is a standard Unix utility , an archiver that does not use data compression .
Currently, ar is mainly used to create and update static libraries that are used by linkers , and for any other purposes, tar is usually used instead (although ar can be used to create archives of any content and purpose, for the most part it has been superseded by the tar utility) .
The implementation of the ar utility from the GNU project is part of the GNU Binutils package .
Use
- ar [-] {dmpqrtx} [abcilosuvV] [archive_component_name] archive-files ...
ar can not only create / extract files from the archive , but also modify them.
The contents of the original file, access rights, time, owner and group are stored in the archive and can be redefined during extraction.
Launch Options
| d | Removes modules from the archive. |
|---|---|
| m | Moves files (moves to end of archive) |
| p | Output specified archive components to standard output. |
| q | Adds files to the end of the archive, without checking for substitution |
| r | Inserts files into the archive (with replacement) |
| t | Shows a table in which the contents of the archive are stored, or files that were specified as a parameter and are present in the archive |
| x | Extracts components (data as files) from archive |
| a | Add new files after one of the existing components in the archive |
| b | Add new files in front of one of the existing components in the archive |
| c | Create archive |
| f | Trims archive names for compatibility with other operating systems |
| i | Insert new files before one of the components existing in the archive |
| o | Restores the original date of archive components when they are retrieved |
| s | Writes the index of the object file to the archive or, if it exists, updates it, even if there are no other changes in the archive |
| u | When replacing files, insert only those that differ from those already in the archive |
| v | Turns on the details display mode when performing an operation. |
| V | Shows ar version |
Links
ar(1)- man help page for FreeBSD user commands