LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2009, 02:23 AM   #1
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Rep: Reputation: 15
compress in diffrent directory


Hi

I have a file size 7gb.
I cannot compress this file in current directory beacuse of insufficient space.

Can I perform the compression in some other mount point?

I use compress command.

Unix
 
Old 06-02-2009, 02:51 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Does compress -c file > /somepath/compressed_file

work?
 
Old 06-02-2009, 03:02 AM   #3
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
No it doesnt work
 
Old 06-02-2009, 03:03 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Why not? It worked for me.
 
Old 06-02-2009, 03:07 AM   #5
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
could you please show in an example
 
Old 06-02-2009, 03:13 AM   #6
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
Billimayday already showed you an example in post #2. If something goes wrong, please paste/copy the exact error message together with the issued command and give any additional information. In alternative to the compress command you can try gzip, using the same syntax:
Code:
gzip -c file_to_gzip > /path/to/file_gzipped.gz
the -c option sends output to standard output, leaving the original file unchanged. The redirection actually stores the output in a compressed file.
 
Old 06-02-2009, 03:59 AM   #7
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Hi
I have managed to compress file.
Its size is without compression 7gb
after compression 1gb.

I cannot uncompress the file by issuing:

uncompress full.dmp

file too large.

I used uncompress -c full.dmp

Since my file is binary, I see weird outputs in the screen during uncompression.

I am not sure wheter it is uncompressing or not, Is that normal or how can I uncompress it?

Last edited by scofiled83; 06-02-2009 at 04:10 AM.
 
Old 06-02-2009, 04:14 AM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Of course you would have to use

uncompress -c full.dmp > full.dmp.uncompressed

although I suspect (but haven't tried it) it you compressed to full.dmp.Z (or renam it) you could just use

uncompress full.dmp.Z
 
Old 06-02-2009, 04:16 AM   #9
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
When I just use:

uncompress full.dmp.Z

I get file too large error message
 
Old 06-02-2009, 04:24 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What about the first version?

Do you have enough space?
 
Old 06-02-2009, 04:25 AM   #11
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
I have space, but I cannot uncompress it

uncompress -c full.dmp.Z > full.dmp
full.dmp: File too large
 
Old 06-02-2009, 04:29 AM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What type of filesystem is it?
 
Old 06-02-2009, 06:50 AM   #13
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by scofiled83 View Post
I have space, but I cannot uncompress it

uncompress -c full.dmp.Z > full.dmp
full.dmp: File too large

Old applications supported files of only 2GB size - maybe it's your case.


7-zip ( http://www.7-zip.org/ ) supports unpacking of .Z files among others; it can be built under UNIXish systems, so maybe it'll solve your problem.
 
Old 06-02-2009, 06:54 AM   #14
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It compressed it though. I'm guessing it could be a FAT filesytem
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logrotate: compress logs in a temp directory gbratig AIX 3 04-12-2008 10:42 PM
compress a directory using tar muskiediver Linux - General 4 07-18-2006 10:24 AM
How to assign diffrent ip/hostnames to diffrent services koppaspider Linux - General 1 02-10-2006 09:03 PM
Can you tell me some diffrent between LILO and GRUB? Khmer Linux - Newbie 5 10-21-2005 09:39 AM
how to compress a directory? hughgjohnson Linux - Newbie 1 11-14-2003 03:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:09 AM.

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