• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how come I can't tar zip or Bzip a folder? :o

mcveigh

Diamond Member
I'm trying to write a little backup script, like I've done before. But I keep getting errors.

tar -zcv evolution/ creates a runaway process, i get gibberish on my screen😱

bzip2 -v evolution gets me this.

Input file evolution/ is not a normal file.

I can zip up files no prob, dut directory's are messing me up.
what did I forget?😱
 
I think you need to pass tar the -f flag also (so tar -zcvf) if you want it to output to a file.

Edit: Otherwise, there shouldn't be any difference between doing one file or a directory.

Double edit: Did you specify the tar filename? "tar -zcvf evolution.tar.gz evolution"
 
The format for tar is: tar <archive file> <directory>

So to create a bz2 compressed tar: tar yc backup.tar.bz2 evolution

Hope it helps.
 
I swear I tried using the -f option and giving a filename earlier with no luck. 😱I do it now and it works thanks People!!



<<
tar -cvf evolution/ should try sending it to your tape drive.
>>



I just learned something!😀
 
gzip:

tar czf filename.tar.gz directory/

bzip2:

tar cIf filename.tar.gz directory/

At least for up to date versions of GNU tar on any Linux distro I've run into. 😉
 
gzip and bzip2 only work on files, not directories. And to make tar use either of them itself you must give it the z flag for gzip or j flag for bzip2, or do it by hand by creating the tar file then compressing it, or compressing it via a pipe.
 
Back
Top