programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
How to delete a file from tar file(archive) without untar it
You can't request more than 20 challenges without solving them. Your previous challenges were flushed.
Mon, 06/14/2010 - 17:58 — Anonymous
We can do this with the tar
Mon, 06/14/2010 - 18:03 — adminWe can do this with the tar command itself using option "-f"
- f The archive file name is given on the command line , required when tar output is going to file
syntax
tar -f {file_name.tar} --delete file1 file2 file3
tar -f myfile.tar --delete index.php folder1/test/testfile.php folder2/test_folder/*
above command deletes the index.php file, testfile.php from in folder1/test and all files of folder2/ test_folder