Welcome to Anything Forums! We are a general discussion forum that believes in freedom of expression and aim to provide a low moderation (within reasonable means) environment to discuss any topic. If you want to join, simply click HERE to be taken to our account management system where you can make an account. If you had an account at iceteks.com, anythingforums.com, uovalor.com or uogateway.com in the past it has been transfered over and you can simply do a password reset.
Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Is it possible to compress files (ex: make a folder a black hole archive) via command line? If yes how do I do it, and how do I extract it? My server drive is getting nearly full so I want to start archiving stuff. I'm hoping to be able to make black hole archives as they are 50% the original size which beats mostly all other compression methods but if that's not possible then anything will do.
Archived topic from Anythingforums, old topic ID:495, old post ID:4360
Honk if you love Jesus, text if you want to meet Him!
Red Squirrel wrote: Is it possible to compress files (ex: make a folder a black hole archive) via command line? If yes how do I do it, and how do I extract it? My server drive is getting nearly full so I want to start archiving stuff. I'm hoping to be able to make black hole archives as they are 50% the original size which beats mostly all other compression methods but if that's not possible then anything will do.
man tar
Archived topic from Anythingforums, old topic ID:495, old post ID:4365
After second try I got it working but there's like hardly any compression on tars, so is there a different way? Black holes are incredible archives, you can get some folders down to like 10% the original size, depending on what's in it. Usually it's 50% but the few last folders I did locally I turned 1GB of data to like 50 megs lol... all logs and easy to compress files.
Archived topic from Anythingforums, old topic ID:495, old post ID:4377
Honk if you love Jesus, text if you want to meet Him!
[root@localhost day_backup]# tar -cfz local.tar local.old
tar: local.tar: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
[root@localhost day_backup]#
Archived topic from Anythingforums, old topic ID:495, old post ID:4399
Honk if you love Jesus, text if you want to meet Him!
tar -cvzf name_of_archive.tar.gz directory_or_files
because the z came in front of the f, you need to put the name of the tarball first before the source directory. it could also be an error in the naming convention in that you gave the -z option so it was expecting the output file to have a *.tar.gz extension.
Archived topic from Anythingforums, old topic ID:495, old post ID:4400
depends. i think gzip does really good on text files. if you got a lot of binaries, the compression might not be so good. if you want you can seperate out the commands. like do a tar first with no -z option and then use the gzip command.
man gzip
to get the options of gzip.
or you could try it with the -j option and try the bzip compression. iiirc, bzip should do better compression.
man bzip2
Archived topic from Anythingforums, old topic ID:495, old post ID:4406
It's mostly text file (html and php) there's some binaries such as pictures but most of it is html. I'll try it with other folders though and see what I get. If not I can just set my samba permissions to write and do it with power archiver. gzip is way faster then black hole at compressing though. If I want to black hole my whole backup folder It's something I'd leave on overnight.
Archived topic from Anythingforums, old topic ID:495, old post ID:4407
Honk if you love Jesus, text if you want to meet Him!
Tar just makes an archive of the files with no compression. You need to add the -z for gzip compression which is really good. If you use -j in stead of -z you are using the bzip which is even better compression.
I think geekhaven had an article on this.
Archived topic from Anythingforums, old topic ID:495, old post ID:4464
Yeah while gzip and tar are good, they don't compete with black hole. But it's ok, since it's good to know there's the tar command since I can use this to make quick archives. I have a 30GB folder on my server and I ain't black holing that over the network. So I'll gzip that one, much faster.
Archived topic from Anythingforums, old topic ID:495, old post ID:4465
Honk if you love Jesus, text if you want to meet Him!
Hmm I just noticed I have backups of backups of backups at some places. while compression is good, nothing beats deletation, when you want to save space.
Archived topic from Anythingforums, old topic ID:495, old post ID:4466
Honk if you love Jesus, text if you want to meet Him!