Internet Marketing Forum

Internet Marketing Forum


For Webmasters and Entrepreneurs
468x60 Russell Simmons
|
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2012, 12:53:12 PM

Login with username, password and session length

You have to have confidence in your ability, and then be tough enough to follow through.


- Rosalynn Smith Carter

|-   Internet Marketing Forum > Online Business Discussions > Website Design and Maintenance > Administration
+  

How to make a tar archive

0 Members and 1 Guest are viewing this topic.
Pages: [1] Reply to Thread
Author Topic: How to make a tar archive  (Read 903 times)
Offlinearie85
Junior Member
arie85 is on a distinguished road
Joined: Jan 2007
Posts: 84


Avatar of arie85

Freelance Graphic Designer

View arie85\s ProfileWWW
Gender: MaleTaurus Israel
notepad Jan 09, 2008, 11:56:52 PM #1
To construct a ``tarball'' that contains copies of all the files in a particular directory subtree:

   1. Use the cd command to change your current working directory to the parent directory of the root directory of the subtree you want to archive. For example, if you want to build a tarball of a directory whose pathname is /u/gertrude/rain/pics/, you would use this command:

              cd /u/gertrude/rain

   2. Pick a name for the tarball that ends in .tgz. In the example, we might call the tarball rainpics.tgz.
   3. Build the tarball with this command:

              tar -cvzf name.tgz subdir

      where subdir is the name of the subdirectory you want to save. To continue the example, this command would be:

              tar -cvzf rainpics.tgz pics

The -c option tells tar to create an archive. The v option tells it to write out the names of the files on your screen as it saves them, so you can be sure it is including everything you want. The z option specifies that the file should be compressed, to save space. The f option instructs tar to use the next name (in the example, rainpics.tgz) for the tarball it is building.

The last argument is the name of the directory subtree to be saved. You could use an absolute path name here, but it is not recommended, because you may be moving the tarball to a system that has different directories. That's why we recommend you use a relative path name here.

Once your tarball file is completed, you can move or copy it elsewhere on the system, or to a different system altogether.

........ (o o) ???
----ooO-(_)-Ooo----
Hero Pixels - - my new graphic design blog
OfflineBrunoBertoli
Beginner
BrunoBertoli is on a distinguished road
Joined: Oct 2007
Posts: 33


anonymous avatar

View BrunoBertoli\s Profile
Italy
notepad Mar 30, 2008, 05:45:56 PM #2
Is there a way I can make a tar archive using PHP ??
Summer Savings! $7.49 .com domains at GoDaddy.com!
Pages: [1] Reply to Thread


Code4Gold Internet Marketing Forum © 2006-2011 Resdaz Media LLC - All Rights Reserved
Forum Software Powered by SMF - © 2001-2008, Lewis Media. All Rights Reserved.