LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-26-2007, 06:24 AM   #1
une
Member
 
Registered: May 2004
Location: Australia
Distribution: Mandrake 10, Puppy Linux 2.13
Posts: 201

Rep: Reputation: 30
Compression


My HDD is 99.5% full so I want to compress a stack of movie clips. When I try to compress the directory;

$gzip -r directoryName

It fails as I am told there is no space left on the HDD. I thought I was shrinking stuff not adding data to the HDD. How can I free up space on my HDD by compressing files with so little space left?
 
Old 12-26-2007, 06:33 AM   #2
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
Dear Une:

You cannot do that. Because, when the % space is just 0.5, where will the computer store the compressed files? I do not think that you can achieve on-the-fly compression. Has anybody yet done that? Even on Windows, just to defragment a drive, it asks for atleast 15% of free space. This is just an example.
 
Old 12-26-2007, 07:24 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Actually when you gzip a file, gzipped data are added to the compressed file while reading from the original one: only when the process has finished, the original uncompressed copy is removed. Therefore, when you run gzip the disk must have room for the original file plus the compressed one (suppose you have a file size of 500 Mb and the compression rate is only 10%: gzip requires 450 Mb of free space to create the compressed copy).

Usually movie clips have a low compression rate, since most of them are already in a compressed format. So you can try to gzip the smaller ones to make room for the compression of the bigger ones.
 
Old 12-26-2007, 01:05 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Compressing movie and audio clips with generic compression programs and algorithms is pointless (due to their random nature), it'll hardly get you 1% compression ratio. The only way to compress audio and video is using specialized compression algorithms and containers, however, take note that all such compression algorithms are rather lossy (you lose quality). It depends on what is your acceptable level for how crappy the video and audio can be.

Just back it all up to a stack of DVDs or something.

Last edited by H_TeXMeX_H; 12-26-2007 at 01:06 PM.
 
Old 12-26-2007, 04:30 PM   #5
une
Member
 
Registered: May 2004
Location: Australia
Distribution: Mandrake 10, Puppy Linux 2.13
Posts: 201

Original Poster
Rep: Reputation: 30
Thanks. Burning to DVD was an option before k3b died. I keep getting an error that appears repeatedly and endlessly that goes something like "Make sure DCOP server is working". I am not at home now and can't recall the error wording precisely. I thought I would compress some stuff to buy me some time. It seems I have to face the music with k3b now and fix it. In fact this may be the prompt I need to ditch Mandrake 10 (which has slowly fallen apart over the last year or so and is now riddled with problems), slot a new HDD into a bay and install the latest Ubuntu distro.

Last edited by une; 12-26-2007 at 04:43 PM.
 
Old 12-27-2007, 08:55 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You can burn a DVD successfully from the command line if you want. You can try bashburn or the like.

For backing up files you can do this (as root):

Code:
growisofs -dvd-compat -speed=4 -Z /dev/dvdwriter -graft-points -rational-rock -full-iso9660-filenames -iso-level 2 /home/bob/myfiles
You can change the speed to whatever you wanna burn at, 1x, 4x, etc. Don't burn too fast tho, it may result in a coaster for you beer or soda And of course the '/home/bob/myfiles' should be replaced by the path to your files you wanna backup.
 
Old 12-27-2007, 03:42 PM   #7
une
Member
 
Registered: May 2004
Location: Australia
Distribution: Mandrake 10, Puppy Linux 2.13
Posts: 201

Original Poster
Rep: Reputation: 30
Thanks a lot, I will give it a go.
 
Old 12-27-2007, 04:20 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Code:
Make sure DCOP server is working
Are you running gnome rather than kde. You may be missing some kde libraries. DCOP is a KDE feature for communicating or controlling a kde application, such as one program calling another, or controlling a kde program from a script.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
About compression on CD s26c.sayan Linux - Newbie 2 04-18-2007 04:27 PM
compression oldstinkyfish Linux - Software 2 12-02-2004 02:53 PM
best compression drigz Linux - Software 2 06-05-2004 07:38 AM
text compression mjolnir General 1 03-23-2004 02:22 PM
MPEG compression suriyamohan Programming 1 03-24-2003 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:53 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
Open Source Consulting | Domain Registration