Viewing the Archive using option -tvf $ tar tvf file.tarĪlternatively referred to as a ‘wild character’ or ‘wildcard character’, a wildcard is a symbol used to replace or represent one or more characters. We can pass a file name as an argument to search a tarfile : This command views the archived files along with their details. $ tar tvf file.tar | grep " filename.file extension"ġ2. $ tar tvf file.tar | grep " text to find" Applying pipe to through ‘grep command’ to find what we are looking for : This command will list only for the mentioned text or image in grep from archived file. We can also list for specific content in a tarfile $ tar tf file.tarġ1. list the contents and specify the tarfile using option -tf : This command will list the entire list of archived file. Update existing tar file in Linux $ tar rvf file.tar *.cġ0. Check size of existing tar, tar.gz, tar.tbz file in Linux : The above command will display the size of archive file in Kilobytes(KB). For example the above command will extract “fileA” “fileB” from the archive files. tar.tbz file in Linux : This command will extract or untar multiple files from the tar, tar.gz and tar.bz2 archive file. ![]() $ tar xvfj file.tar -C path of file in directoryħ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |