iphitus Posted July 30, 2003 Report Share Posted July 30, 2003 Ok it's simple, For tar.gz tar -zxvf nameof.tar.gz And for tar.bz2 tar -xvjf nameof.tar.bz2 And zip unzip nameof.zip James Quote Link to comment Share on other sites More sharing options...
MottS Posted July 30, 2003 Report Share Posted July 30, 2003 I use to check this site for compress/decompress command line problem. http://www.ozetechnology.com/howtos/compress.shtml MOttS Quote Link to comment Share on other sites More sharing options...
iphitus Posted July 30, 2003 Author Report Share Posted July 30, 2003 I need to find a good, n00b bash/ simple command line tutorial for someone. They've pretty much never used a command line before. Anyone know one? James Quote Link to comment Share on other sites More sharing options...
phunni Posted July 30, 2003 Report Share Posted July 30, 2003 Check out the tutorial on www.linux.org - can't remember exactly where it is, but it's pretty easy to find Edit: here it is: http://www.linux.org/lessons/beginner/index.html Edit #2: If linux is already installed, then jump to chapter 3, if it's just the command line, then maybe a later chapter Quote Link to comment Share on other sites More sharing options...
Guest 969696 Posted September 14, 2003 Report Share Posted September 14, 2003 hope this is not off topic. I had to unzip about 200 zip files but unzip *.zip did not work. This one, found at Linux Tips , worked unzip '*.zip' . Quote Link to comment Share on other sites More sharing options...
iphitus Posted September 15, 2003 Author Report Share Posted September 15, 2003 i forgot i wrote this!! Thanks for that unzippin 200 zips one, that's gonna help heaps!! Especially when i decide to download 30 new gtk themes again!! James Quote Link to comment Share on other sites More sharing options...
sud_crow Posted September 15, 2003 Report Share Posted September 15, 2003 i knew i was missing something! thanks for the "multiple file unzipping tip", and an aclaration, works for tar also! now the contrib: to make things easy, if you want to run, lets say: tar xvfz filename.tar.gz you could use an alias, such as ugz (or whatever fits you, while its not an existing command) by editing $HOME/.bashrc and adding: alias ugz='tar xvfz' This can be edited to any kind of command also, for ex. for bz2 files, instead of tar xvfj ... you could use ubz2... thats it. i know its not much, but i found it to be quite practical when building the LFS system... Quote Link to comment Share on other sites More sharing options...
sud_crow Posted September 27, 2003 Report Share Posted September 27, 2003 mmmm.... i dont know why.. but now its not working with tar... please help? :roll: i want to unpack lots of skinz for GKrellm and i wont be doing that manually, also tryed using a list: tar xvz --from-file skins didnt worked... dont know why either... Quote Link to comment Share on other sites More sharing options...
Guest GorGor Posted October 1, 2003 Report Share Posted October 1, 2003 umm, don't mean to be mean, heh heh I prefer to write the above commands this way, notice its either a J or Z (without hyphen) and then the string XVF tar jxvf file.tar.bz tar zxvf file.tar.gz Because normal TAR s are done with tar xvf file.tar hope that helps Quote Link to comment Share on other sites More sharing options...
sud_crow Posted October 2, 2003 Report Share Posted October 2, 2003 Hi, I think you didnt understand the message ;) I will explain my self a bit better. The command you name (tar XVFZ) its for eXtract, Verbose, File, gZipped (the caps are for each option after tar). Thats why it doesnt work with multiple files, because i dont want to extract a single File, but several so i have to use a list or other method wich i dont know. when i say, now its not working with tar, refer to this: hope someone gets what i mean and has a solution. unzip '*.zip' but ussing tar instead of a zip file: tar xvz '*.gz' Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 2, 2003 Report Share Posted October 2, 2003 Just a stab in the dark but have you tried using backticks (`) instead of appostraphies? Quote Link to comment Share on other sites More sharing options...
sud_crow Posted October 3, 2003 Report Share Posted October 3, 2003 uhmmm... i´ll try that later... i really dont know if i want that thing to work!! ;) Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 3, 2003 Report Share Posted October 3, 2003 I can tell you why it doesn't work but I ll have to think to provde a way to do it. I sucspect you realise anyway....:wink: tar takes input from the $1, not stdinput. try it tar cvf It doesn't wait to be fed input terminated by CTRL+D While this sounds like a weakness for unix you need to remember that tar is really a tape archiver. Consider the implications of reading from a tape who's contents are unknown. It might be one long tar or several seperate ones. The expansion of *.tar has no meaning to the tape, it just reads blocks. tar xvf /dev/rmt/1 . (read/extract the first tar from a device rmt/1) or in linux /dev/st1) In fact the extension has no meaning....the tape is a pure block device with no filesystem, the tar encapsulates the original filesystem and allows you to store the files on a tape. The file has no name becuase the tape has no filesystem. After its done that it will stop, Repeating tar xvf /dev/rmt/1 . will read the next set of blocks up to the EOF's. Not only that.... Imagine your sat at an SGI running IRIX with a XFS filesystem and you create the tar file ... Then you sit at another workstation running Solaris with UFS, linux with ext3 or AIX with jfs....or Beos or BSD ..... The files are still extracted perfectly onto the host filesystem. Isn't that beautiful ???? Quote Link to comment Share on other sites More sharing options...
Qchem Posted October 3, 2003 Report Share Posted October 3, 2003 You could try using a shell script: #!/bin/bash for i in *.tar.gz do tar -xvzf $i done exit 0 I have no idea if this will work or not, let me know if it does... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.