Detailed explanation of the functions and parameters of the Linux system ar command

  
                

The Linux system ar command is mainly used to package files into libraries. Of course, it can also be used to create and modify files. Here is a detailed description of the Linux command ar function and parameter description.

Function: create or modify files kept, or extract the file from the file kept.

Syntax: ar[-dmpqrtx][cfosSuvV][a "Member File"][b"Member File"][i"Member File"[[Save File][Member File]

Supplementary note: ar allows you to collect many files and become a single backup file. In the backup file, all member files retain the original attributes and permissions.

Parameters:

Command Parameters

-d Deletes the member files in the backup file.

-m Changes the order of member files in the staging file.

-p Displays the contents of the member files in the backup file.

-q Attach the questioner to the end of the file.

-r Insert the file into the staging file.

-t Displays the files contained in the backup file.

-x Take out the member file from the self-storing file.

Option Parameters

a Member File Inserts a file after the member file specified in the staging file.

b "Member File" Inserts a file before the member file specified in the standby file.

c Create a backup file.

f To avoid excessively long file names that are not compatible with other system ar directives, you can use this parameter to cut off the name of a member file that is too long to be placed in a scratch file.

i "Member File" Insert the Asker before the member file specified in the file.

o Keep the date of the file in the backup file.

s If the object file is included in the file, you can use this parameter to create a symbol table for the file.

S Does not produce a symbol table.

u Only insert newer files into the scratch file.

v Display detailed information when the program is executed.

V Displays version information.

The above is the function and parameter description of the Linux command ar. In the Linux system, the ar command is one of the more commonly used commands, so it is necessary to be familiar with it.

Copyright © Windows knowledge All Rights Reserved