Up to you which you find easier or most useful. Option 2 $ tar -xzf -wildcards -no-anchored '*contract*' Then you extract what you want using: $ tar -xzf 1 file : data Shraddha at 13:28 2 Either the files are already uncompressed and contain data or text in an encoding file doesn't recognize (try it: rename one to file.txt and open it in an editor), or you should talk with whoever guaranteed you they aren't corrupted. To extract a single file, provide the path and the name of the file. Example: gunzip -c Output: -f: To decompress a file forcefully. The compressed file has to be a text file only. The ASCII/EBCDIC conversion is automatically done if it is suitable. Note that the path is wrapped in quotation marks because there are spaces in the path. Options: -c: This option is used to view the text within a compressed file without uncompressing it. This will list the details of all files whose names contain your known part. To extract all the files from a directory within a tar file use the following command. You have two options:Įither use tar and grep to list the contents of your tarball so you can find out the full path and name of any files that match the part you know, and then use tar to extract that one file now you know its exact details, or you can use two little known switches to just extract all files that match what little you do know of your file name-you don't need to know the full name or any part of its path for this option. Let's assume you have a tarball called and you just know there is one file in there you want but all you can remember is that its name contains the word contract.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |