LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2004, 04:43 PM   #1
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Rep: Reputation: 30
shell script - add file to archive ?


I am currently doing some programing for a game. When I finish a section or programing, im sure you know, you compile it, then run the file. However in this case, the compiled file needs to be put in an archive, where it is then read by the game. I am currently doing this manually, opening ' file roller ', opening the archive, then adding the new files over the old ones, and then running the game to test the file.

However, there is a glitch. I have 3 differnt librarys that i am working on, that all need to be put in the same archive. I may change two librarys, and I dont want to add a file, manually, twice.

So I need a script that *just* adds a whole directory into an archive. ( I do need the directory, aswell as these files within the directory, to maintain file structure ).

I hope you can help me out with this. Many thanks in advance.
 
Old 02-09-2004, 05:50 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
How about something like this.
You can change to the directory which needs backing up and use the period ( . ) in the command or just use the path to that directory instead.

find . -depth | cpio --pass-through \
--preserve-modification-time \
--make-directories --verbose /backup/directory
 
Old 03-20-2004, 03:27 PM   #3
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
I really need to know how to add files to an archive using gzip.. via the terminal..
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script to add samba users dickohead Programming 14 11-18-2016 02:28 AM
how to add numbers in a formatted file via a bash script? zero79 Linux - General 8 12-24-2010 05:48 PM
Shell Script: Add Users from file flobadon Programming 3 12-07-2004 03:49 PM
Two Questions: c shell and archive file MisterT Linux - Newbie 3 05-13-2003 03:27 PM
Add User Shell Script DAC Programming 2 10-13-2002 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration