The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Auto copy for files from folder to folder upon instant writing Bashar UNIX for Advanced & Expert Users 2 08-21-2008 03:44 PM
Checking Current Service Pack & Hot Fixes of XP swapan Windows & DOS: Issues & Discussions 1 06-02-2008 06:55 AM
Use awk to create new folder in current directory ccox85 Shell Programming and Scripting 6 01-28-2008 03:59 AM
Parse the .txt file for folder name and FTP to the corrsponding folder. MeganP Shell Programming and Scripting 3 07-03-2007 02:54 PM
Perl help!! (pack()?) Euler04 Shell Programming and Scripting 2 10-18-2005 11:58 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-14-2007
WebWatch WebWatch is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 2
Pack current folder

How do I pack (using tar zcvf ?) the current folder inluding all files and folders ??

I need to be sure to get all files and folders/subfolders...

Later I will unpack into a new folder on a new server..

Appreciate any help..
  #2 (permalink)  
Old 12-14-2007
d0nny2600 d0nny2600 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
Tarballlllering

Hey,
This should sort you out

tar cvzf Yourfolder.tar.gz /home/YourFolderName

that should create a tarball of YourFolderName and all sub dirs and save it as Yourfolder.tar.gz
  #3 (permalink)  
Old 12-14-2007
WebWatch WebWatch is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 2
Thanks..

But that looks like it will use the YourFolderName when I unpack it... right ?

This is what I have tried:
Quote:
tar zcvf filename.tar.gz /httpdocs
Problem is the new server has public_html instead of httpdocs
which gives me public_html/httpdocs

I'd like to do this:
Quote:
cd /home/YourFolderName
tar zcvf filename.tar.gz *.*/*.*
or similar... I want all files in current folder and all subfolders....

must be simple but I'm not there yet...


anyone ?
  #4 (permalink)  
Old 12-17-2007
d0nny2600 d0nny2600 is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
re

So in which case.. tar the folders using the method outline before.

Unpack it into the dir. If it puts them in the incorrect directory just do a cp *.* and move them to the folder you want to use instead. This is a lot easier if you have a GUI to boot into!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0