dime cyborgian <[email protected]> ha escrit: > Is there a option using which I can just add a description about a > archive
Yes, there is. > in a file say description.txt and it should be viewable when I > use a syntax > cat description.txt > This tar is created for test purpose. > tar -czvf test.tar.gz mydir > for example: > tar --view-desc test.tar.gz > This tar is created for test purpose. Try --label/--test-label: 1. Creating archive: $ tar -czvf test.tar.gz --label="`cat description.txt`" mydir 2. Testing the rchive: $ tar -tf test.tar.gz This tar is created for test purpose. [..archive listing follows..] 3. Viewing the label: $ tar --test-label -f test.tar.gz This tar is created for test purpose. 4. Checking whether the label matches given text: if tar --test-label \ -f test.tar.gz 'This tar is created for test purpose.'; then ... fi The --test-label option appeared in tar 1.24. You will get more info on it in the GNU tar Manual, section 9.7 "Including a Label in the Archive" (an online copy is available at http://www.gnu.org/software/tar/manual). Hope that helps. Regards, Sergey
