Failure to untar() a *.tar.gz file
11 ビュー (過去 30 日間)
古いコメントを表示
For some reason, I am unable to untar a handful of random *.tar.gz files using Matlab's untar() function.
My error message is as follows:
"Error using untar (line 82)
In 'MATLAB:untar:invalidTarFile', data type supplied is incorrect for parameter {0}."
These are local files with no URL involved. I can untar manually just fine using 7zip. Please advise.
0 件のコメント
回答 (2 件)
Yogesh Khurana
2019 年 7 月 24 日
untar() only accepts character vector or scalar string as data-types for the filename. Please check the data-type of filename you are sending to the function.
For more information please refer to following link:
2 件のコメント
Robert
2022 年 5 月 18 日
Your file is tarred, but also gzipped, so this should work:
myFile = "C:\Files\test.tar.gz";
tarFile = gunzip(myFile); % Gives a cell array of file names.
untar(tarFile{1})
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Software Development Tools についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!