login about faq

I’m interested in getting your Bundle, specifically for the TAR feature. After looking at your on-line documentation, I have two questions.

1) If I want to TAR up the sub-directory in a directory (i.e. relative to), how would I do that? For example, using the UNIX tar command, I would cd /home and tar up "user1" sub-directory by typing tar –cvf /tmp/myuser.tar user1

2) Will your tar follow UNIX links?

asked Oct 16 '12 at 16:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


The solution is to set the Tar.DirPrefix property equal to "user1".

The DirPrefix is a prefix to be added to each file's path within the TAR archive as it is being created. For example, if the property is set to the string "subdir1", then "subdir1/" will be prepended to each file's path within the TAR.

You would call AddDirRoot("/home/user1"), and this will tar up the user1 directory tree. Setting the DirPrefix equal to "user1" will make it equivalent to the tar command you mentioned.

It will follow symbolic links for files, but not directories.

link

answered Oct 16 '12 at 16:43

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×3

Asked: Oct 16 '12 at 16:42

Seen: 1,019 times

Last updated: Oct 16 '12 at 16:43

powered by OSQA