Monday, 8 March 2021

How to extract a TAR file in Linux / unix OS or on MAC

You can use tar command to extract, create, list, update, add/replace the files in the given .tar compressed file.

tar command provides the various options:

-t          List

-x         Extract

-c         Create

-r        Add/Replace


-v        Verbose

-f        <filename> Location of archieve


For Example, to list the contents/files in an given .tar file

tar -tf <.tar filename>            Lists all the files

tar -xvf <.tar filename>        Extracts all the files

No comments:

Post a Comment