Self extracting tarball


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Self extracting tarball
# 1  
Old 03-03-2016
Self extracting tarball

I was wondering if anyone can point me to some topics, material, or tutorials that can help me write a shell script that creates a second script that is a Self-extracting tarball. Don't want any actual code obviously because this is a school project, but I feel my teacher didn't well cover the topic(if he did I somehow missed it with perfect attendance) and isn't helping much when i ask questions. Please don't post anything like google or unix . com. Any code I've looked at on the topic seems very confusing so far so i have a lot to do and its going to be a late night. He did mention something about using base64 as a hint.
# 2  
Old 03-03-2016
The base64 hint might be referring to uuencode and uudecode that take 24 bits of three characters and turns them into four characters of 6 bits each plus a constant in the first two bits to make them printable. A script would encode your target file and prepend instructions to run a tail on itself and decode your tailed data. If your file is already compressed in some way, you would need other instructions to appropriately uncompress the output of your tail.

G'luck!

Welcome to the forum.
This User Gave Thanks to wbport For This Post:
# 3  
Old 03-03-2016
Thank you for the help do you have any links you may suggest or hint commands i can look up in order to base some research off of. Im going to have to read up on a lot of things in order to figure it all out.
# 4  
Old 03-03-2016
For linux use tar with the -z option. Work to compress/uncompress:

Code:
tar -cvz tarfilename ./path/to/files   # compress and stroe
tar -xvz tarfilename                        # uncompress and extract to new files

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Creating a tarball on Solaris issue with errors

Hi All, We are planning to migrate from Solaris to AIX, and we have a requirement to move all files modified in last 7 days to AIX. i found many helpful forums on this site but somehow the issue was still not solved: Used the following command from the directory which we want to scan ... (6 Replies)
Discussion started by: nikhil8
6 Replies

2. Shell Programming and Scripting

Extract compressed tarball to folder?

This is for Red Hat Enterprise Linux Client release 5.7 (Tikanga). Wanna extract entire contents of a tar.gz to a folder of my choosing. Thanks (2 Replies)
Discussion started by: stevensw
2 Replies

3. Shell Programming and Scripting

tarball of current directory

I wanna make a backup tarball. I wanna write a script that makes tarball of the current directory. There are lots of files so I cant type all files, I wanna make the tarball by excluding few files. Like there 1000 files in a directory I wanna create a tarball containing 98 files of that... (1 Reply)
Discussion started by: nishrestha
1 Replies

4. Shell Programming and Scripting

Unpack individual files from tarball

Say you don't want to unpack the whole thing, just individual files or directories within a .tgz. How to do this? (1 Reply)
Discussion started by: stevensw
1 Replies

5. Shell Programming and Scripting

Extracting substring

Hi, I have string in variable like '/u/dolfin/in/DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010' and i want to conevrt this string into only "DOLFIN.PRL_100.OIB.TLU.001.D20110520.T040010" (i.e file name). Is there any command to extracting string in some part ?(rather than whole path)? ... (5 Replies)
Discussion started by: shyamu544
5 Replies

6. UNIX for Dummies Questions & Answers

extracting character

This time I am trying to extract the number 10 from the following line. This number is subject to change and may be anything from 1 to 3 numerals in length, i.e. 1-999. Hence why I dont want to use 'cut' cmd. The line I am working on is GGSN-MIB::ggsnApnName.10 = STRING: open.internetI have... (7 Replies)
Discussion started by: rob171171
7 Replies

7. UNIX for Advanced & Expert Users

Size of a tarball without untarring - Catch parent tar ball has sub tars

hi, I am in a weird situation. I have a parent tarball which contains 2 sub tarballs. The structure is such : Parent.tar.gz ---- > child1.tar.gz and child2.tar.gz I need to get the size of the parent tarball without untaring it I know that the command is gunzip -c parent.tar.gz | wc -c ... (1 Reply)
Discussion started by: mnanavati
1 Replies

8. UNIX for Dummies Questions & Answers

Is there any way to add to a tarball made in this fashion

Hello, I am wondering if there is an easy way to add a file to a tarball rather than extracting, adding, then remaking the tarball. The tarball was made in this way: tar -cpvzf .wine.tar.gz .wine/If I had a file to the .wine/ dir (or if I just wanted to add a file to the tarball), I would... (4 Replies)
Discussion started by: Narnie
4 Replies

9. Shell Programming and Scripting

Extracting the checksum

I wanted a script that can give the checksum of a particular zipped file. Can somebody help me in writing a shell script in getting the checksum of a particular tar file. (1 Reply)
Discussion started by: vkca
1 Replies

10. Shell Programming and Scripting

Extracting IP's from a file

I've been trying to work out a way to extract IP's from a file. The IP's are contained withing brackets like this: is there a way to extract just the IP's or at least everything from the starting to ending bracket with grep or something similar? Thanks in advance. (14 Replies)
Discussion started by: eth0
14 Replies
Login or Register to Ask a Question