Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
if you'd like to look at the files, double click it from within the gui -- then you can extract individual files you'd like to look at. Otherwise, you're stuck with the above suggestions, i.e. using the -t option will list the files, and using the -x option and placing an extra argument with the name of a file will extract only the one you want. michaelk had it right on, the man pages are great (man tar if you're unfamiliar)
Most times I double-click the tarball on Konqueror to decompress it. For such a reason I already forgot the command learned at the beginning to read its content without decompressing the tarball. I read 'man tar' but could not figure out a solution. What I want to do is similar to the steps working on a gunzip file as follows;
# gzip -dc initrd.gz >initrd.img
# mkdir initrd
# mount -o loop initrd.img initrd
# nano /initrd/files (to edit the file/files)
to recompress it after editing
# gzip --best initrd.img initrd.gz
I expect to do it on the tarball. Is it possible? If YES, any hint? TIA
Hmm... in the gzip commands you're using, the mounting is not a property of gunzip (or of tar for that matter). It's a property of the initrd image (keyword here, image). An initrd is a memory image the computer can load at boot to get some extra modules before the kernel gets up and running (i.e.... hard drive helps, if it's not compiled into the kernel), so all you're doing is mounting this image to a folder. But you're decompressing the whole thing, which can be achieved with a tarball by
tar -xzvf ../tarballname.tar.gz
Now you can edit files to your heart's content, then when you're done, from the dir with the tarball,
mv tarballname.tar.gz tarballname.tar.gz.bak
tar -czf tarballname.tar.gz temp/*
And it'll be re-tarred and compressed.... AFAIK you can't at all read / edit without decompressing first... it would rather defeat the purpose of decompressing at all?
well, it's a nice thought... you can do it with an uncompressed tar, but once you have a compressed tar, adding individual files is not possible without decompressing / recompressing the entire archive.
You could just decompress it, leave it as a tar, extract one file, edit it and put it back in (use the u option (tar -u tarball.tar file)), Then recompress when you're done...
There may be some little tricks I don't know about (certainly wouldn't be the first time), but AFAIK, the update file and append file options don't work with compression.