LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-26-2003, 08:38 AM   #1
amaze
LQ Newbie
 
Registered: Aug 2003
Location: UK
Posts: 19

Rep: Reputation: 0
Create an archive file which includes files in sub-directories?


Hi,

I want to create a archive (compression isn't an issue) which will recurse down sub-directories and create a single archive file (i.e. .tar) which can then be un-packaged and re-creates the same directory structure and files in the files in the correct places?

I have read up (and tried...) many different switches in tar & gzip but I cant for the life of me find out how to do it.

Any help would be great.

Thanks
 
Old 09-26-2003, 08:43 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 7,514
Blog Entries: 1

Rep: Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139Reputation: 1139
Something like this maybe:

tar cvf tets.tar `find . -type f -print`

finds all regular files from current dir, including subdirs and tars them.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
file permissions not being remembered for SAMBA printer files/directories Avatar Linux - General 0 08-30-2005 01:44 PM
eclipse + CDT : how can i create a project which includes multi main( ) tclwp Programming 4 02-11-2005 08:27 AM
Why when editing files does Linux create a duplicate file with a ~ in the extension? bugbite99 Linux - General 6 01-17-2005 02:21 PM
set file permissions for 100 directories & its files cevjr Linux - Security 6 01-06-2005 10:23 AM
how to create a archive .a file using g++? hari_linux Programming 0 03-07-2003 09:12 AM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration