English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux ar command is used to create or modify backup files or extract files from backup files.
The ar command on Linux allows you to combine many files into a single backup file. In the backup file, all member files retain their original attributes and permissions.
ar[-dmpqrtx][cfosSuvV][a<member file>][b<member file>][i<member file>][backup file][member file]
Parameters:
Required parameters:
Option parameters:
Packed file
[[email protected] ~]# ls //Display the files in the current directory a.c b.c d.c install.log qte anaconda-ks.cfg c.c Desktop [[email protected] ~]# ar rv one.bak a.c b.c //Pack a.c b.c files ar: Creating one.bak a - a.c a - b.c [[email protected] ~]#
Pack multiple files
[[email protected] ~]# ar rv two.bak *.c //Pack files ending with .c ar: Creating two.bak a - a.c a - b.c a - c.c a - d.c [[email protected] ~]#
Display the content of the packed file
[[email protected] ~]# ar t two.bak a.c b.c c.c d.c [[email protected] ~]#
Delete the member files of the packed file
[[email protected] ~]# ar d two.bak a.c b.c c.c [[email protected] ~]# ar t two.bak d.c