LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 11-06-2010, 12:12 PM   #1
siva balan
LQ Newbie
 
Registered: Jul 2010
Posts: 25

Rep: Reputation: 0
compressing collection of text files


i have a collection of text files for 50 gbs..i want to compress these files and store them into dvds.i want to know the present popular optimized method to compress the files.let me know masters.

regards and thanks in advance.

Last edited by siva balan; 11-06-2010 at 12:15 PM.
 
Old 11-06-2010, 12:26 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
You mean the best way to compress text files ? I'd say LZMA. So, you can either use p7zip (lzma is default, but you can increase compression), or http://tukaani.org/xz/

p7zip may be a better option because you can make volumes of a certain size, like 4480 MB, so they can fit on DVDs.
 
Old 11-06-2010, 12:34 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
I agree with Texmex about LZMA - if sheer "compression strength" is the main question, that's currently the way to go. Second to that, I'd suggest bzip2, however, as implied above by Texmex, either way you'll need to take some measures to ensure that whatever finished archives you end up with, are of a suitable size to fit onto your media.

And note, very high compression takes a long time no matter which method you use, so keep in mind that for example, going from compression level -6 to level -9 may not provide that much added compression that it's worth the added time it took -- it's up to you how much time costs and media costs.
 
Old 11-06-2010, 02:51 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Not a direct answer to your question, but you might want to look at fusecompress to reduce you storage requirements on you hard drive. With fusecompress you define a directory on your system to hold compressed files, and any (compressable) file added to the directory is automatically compressed. Mounting the directory allows you to access it as though the contents were not compressed.

On my system I keep a compressed directory of several hundred books (Mostly from Baen Books) in a "Compressed Books" directory, which I access as "Books" by placing the script, below, to be run from .kde/Autostart.

Code:
#!/bin/bash
#
# Mount a compressed file system
#
compressed="/home/Peter/Compressed Books"
uncompressed="/home/Peter/Books"
args="allow_root"
# Are we using the same directory for compressed and uncompressed data?
[ "$compressed" = "$uncompressed" ] && args="$args",nonempty
# Skip the mount part if the target is already mounted
mounted=$(mount | grep "$uncompressed")
if [ -z "$mounted" ]
then
  fusecompress -o "$args" \""$compressed"\" \""$uncompressed"\"
fi
Oh, if you're interested, here's what the Autostart desktop file looks like:
Code:
$ cat .kde/Autostart/Uncompress_Book.desktop 
#!/usr/bin/env xdg-open
[Desktop Entry]                                                          
Categories=script;                                           
Comment[en_US]=Uncompress Books                                            
Comment=Uncompress Books                                                   
Encoding=UTF-8                                                           
Exec=/home/Peter/Scripts/bash/Uncompress_Books                                                          
GenericName[en_US]=Run FUSEuncompress                                           
GenericName=FUSEuncompress                                                  
Icon=/usr/share/icons/default.kde4/32x32/apps/preferences-system-performance.png
MimeType=
Name[en_US]=fuseuncompress
Name=fuseuncompress
Path=
StartupNotify=true
StartupWMClass=
Terminal=true
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-Desktop-File-Install-Version=0.15
X-KDE-SubstituteUID=false
X-KDE-Username=
Note: I just moved to F14 from F13, and fusecompress was not working properly with its default compression method (lzo), but recompressing my compressed directory with a fusecompress_offline -o fc_c:lzma Compressed\ Books/
seems to have fixed the problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressing VOB files eplanamente Linux - Software 6 01-04-2006 12:15 PM
Mandrake and compressing files stevsom Linux - Software 1 06-06-2005 08:52 PM
compressing files master Linux - Newbie 4 03-18-2004 12:48 PM
zipping/compressing folders and files DiZASTiX Linux - Newbie 1 05-26-2003 09:48 PM
Compressing files GtkUser Linux - Software 1 04-02-2003 07:21 AM


All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration