I have a huge tarbell archive with an excessively large or damaged error_log that causes the archive to freeze when trying to extract it. Is there a way to remove this from the archive before unpacking or extracting the archive without extracting that specific file on a Mac OS X terminal?
I found this post about how efficiently-remove-files-from-large-tgz , however I tried the -delete flag but got this error:
tar: Option --delete is not supported
Is there any way:
As mentioned in the comments, it is not possible to delete the file using tar, but you can exclude the file when you extract:
tar -zxvf file.tar.gz --exclude "file_to_exclude"
You can pack it like this:
tar -czvf ./new.tar.gz --exclude='._*' @old.tar.gz
I used ._* to delete all ._files , but you can use any template you like, including the full path, directory, file name, or whatever.
._*
._files
Dear, you can delete the archive file in the same format in which we delete the directory from below using the command through
command: - rm -rf archive file name r: - recursively
Source: https://habr.com/ru/post/989467/More articles:How to get chat history using Java Smack library from openfire server? - xmppAndroid popup menu button - androidHow to dynamically add a descent to orderby? - c #Get current controller name in AngularJS - javascriptHow to transfer redirected data to codeigniter - phpRails 4.2, rspec 3.3, capybara 2.4 gives f.QueryInterface not a function? - ruby | fooobar.comHow to write unit test in code using Google Maps for JS - javascriptIs it possible to use the "fs" module (file system) inside a page executed by PhantomJS? - javascriptDisable swap UIPageViewController - Swift - iosHow to mock jQuery with Jasmine - jqueryAll Articles