THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
No Format |
---|
ls -l > context.txt gzip content.txt mkdir tardir mv content.txt.gz tardir tar cvf archive.tar tardir rm -r tardir |
The content of the content.txt
file is just a directory listing, dump in anything you want here. For this example the sample archive.tar
is located in the /extra/data/tryVfs
directory. You can see that hardcoded in the java example below. The content.txt
file will be extracted into the same location.
...
No Format |
---|
Nov 6, 2007 2:38:56 PM org.apache.commons.vfs.VfsLog info INFO: Using "/tmp/vfs_cache" as temporary files store. Resolve tar file: Path : / URI : tar:file:///extra/data/tryVfs/archive.tar!/ Extracting file:///extra/data/tryVfs/content.txt.gz Decompressing file:///extra/data/tryVfs/content.txt.gz gzName=gz:///extra/data/tryVfs/content.txt.gz fileName =content.txt decompName =file:///extra/data/tryVfs/content.txt tmpDirname =file:///extra/data/tryVfs/content.txt.tmp tmpFilename=file:///extra/data/tryVfs/content.txt.tmp/content.txt |
In addition to the archive.tar
file, there should now be a content.txt
file in the same location.