Archive files using ‘ar’ command

Hi all,
Here is a Linux command that is not very common. We archive files using the ‘tar’ command, here the command ‘ar’ is used to archive files. Some of the options and details are shown below with ‘ar’.

Take the terminal window and type in the below command.

Archive files:

ar -q destination_name file_to_archive


Suppose we have a file called random and we have to archive it, then we follow the below command.

root@server# ar -q random.gz random

Extract files:

You can use the below command to extract files.

ar -x destination_name file_to_extract


root@server# ar -x random.gz

That’s all, please refer the man page for more information: man ar


Scroll to Top