LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   trouble compressing a folder (https://www.linuxquestions.org/questions/linux-general-1/trouble-compressing-a-folder-821824/)

newbiesforever 07-24-2010 12:45 AM

trouble compressing a folder
 
Today I tried to compress some folders containing backup files from last year. I right-clicked on the folders and selected compress as tar.gz. I let it work, and found that hours later, the folders were still compressing. How long is it supposed to take, anyway? I was trying to compress the two sets of backups simultaneously; together they're around 1.5 GB. They have many subdirectories.

business_kid 07-24-2010 03:19 AM

Run one compression job at a time. How fast depends on your pc and your compression. bzip2 is slowest. You can speed things up by not compressing already compressed files, e.g. jpegs. I'd expect it finished in under an hour.

Wim Sturkenboom 07-24-2010 06:59 AM

If you use tar from the command line, you can add the -v flag to follow the progress
Code:

tar -cvzf myarchive.tar.gz directory_that_i_want_to_backup
It might give you an idea how fast things are going

newbiesforever 07-24-2010 12:23 PM

Thank you. So I have to specify that the compressed archive should be called [name].tar.gz? I thought it would automatically give the folder's original name to the tar.gz. Well, no wonder KDE sat there for hours saying "Compressing..."--it hadn't given me an opportunity to specify what the archive should be named, and therefore didn't know.

EDIT: Okay, it seems to have worked, but the results weren't what I expected. tar put the tar.gz in my /home folder, which is on a different hard drive, instead of in the same location as the item to be compressed. I know--I should have specified the desired location too. I just thought tar would, by default, put the tar.gz in wherever its target was.

AlucardZero 07-24-2010 04:22 PM

Default is current working directory, so you must have been in $HOME.


All times are GMT -5. The time now is 06:35 PM.