Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the common command ar in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Linux common command ar how to use", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "Linux common command ar how to use" this article.

Linux common commands ar commands are used to create or modify storage files, or to extract files from storage files. Ar allows you to assemble many files into a single storage file. In the kept file, all member files retain the original attributes and permissions.

Syntax ar [- dmpqrtx] [cfosSuvV] [a] [b] [I] [save file] [member file] parameter:

Required parameters:

-d Delete the member file in the archive file.

-m change the order of member files in the storage file.

-p displays the contents of the member files in the archive file.

-Q appends the file to the end of the stored file.

-r insert the file into the standby file.

-t displays the files contained in the archive file.

-x remove the member file from the self-saved file.

Option parameters:

An after inserting the file into the member file specified in the standby file.

B before inserting the file into the member file specified in the standby file.

C establish and keep documents.

F to avoid excessively long file names that are not compatible with the ar instructions of other systems, you can use this parameter to truncate the excessively long member file names to be placed in the storage file.

I before inserting the file into the member file specified in the standby file.

O keep the date on which the documents in the document are kept.

S if the file contains the object schema, you can use this parameter to establish the symbol table of the file.

S does not produce a symbol table.

U only files with newer dates are inserted into the backup file.

V displays detailed information when the program is executed.

V displays version information.

Instance package file

[root@runoob.com ~] # ls / / displays the current directory file a.c b.c .c install.log qte anaconda-ks.cfg c.c Desktop [root@runoob.com ~] # ar rv one.bak a.cb.c / packaged a.cb.c file ar: creating one.bak a-a.c a-b.c [root@runoob.com ~] # packaging multiple files

[root@runoob.com ~] # ar rv two.bak * .c / package files ending in .c ar: creating two.bak a-a.c a-b.c a-c.c a-d.c [root@runoob.com ~] # showing the contents of the packaged file

[root@runoob.com ~] # ar t two.bak a.c b.c c.c d.c [root@runoob.com ~] # Delete member files of packaged files

[root@runoob.com ~] # ar d two.bak a.c b.c c.c [root@runoob.com ~] # ar t two.bak d.c above is all the content of this article "how to use Linux commands ar". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report