Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Have been using Ubuntu for about 2 weeks right now and I am in love with it. The only thing I was wondering if it is possible to view the percentage on a process in the terminal, sounds a bit vague but Ill explain it.

Every 2 days I am backing up my system by simply using the terminal. I know I can view my active services by simply typing "top". I notice that the service called gzip is currently active, which is (if I am not mistaken) the service needed for compressing the back up. I was wondering if I could select that service so that it shows me the approximate time needed and the percentage completed.

I don't know if it is possible, maybe that the service doesn't know the actual size of the back up being made or anything else, but I was simply wondering if there is something to monitor this. Could be coming handy for moving big files between HD's.

share|improve this question
    
gzip is not a backup service, it is only a compression program that your real backup service likely uses. –  grawity Jun 8 '13 at 13:28
    
@grawity Thx! I changed my question. –  Kipt Scriddy Jun 8 '13 at 13:32

1 Answer 1

up vote 0 down vote accepted

Quick answer: NO

gzip is simply a compression program, not a service in any way. It is equivalent to winzip (though it uses a different compression algorithm). gzip offers no option to track the completion of the process. As a general rule, on *nix you can see the manual for a command by running man COMMAND, for example man gzip.

Now, a better way to do what you are attempting is to use rsync for your backups which is designed for backing up data. rsync will not create a compressed archive but it can dynamically compress a file while it is being transferred and so dramatically speed up transfer rates:

rsync -azv --progress /files/to/backup /path/to/destination

OPTIONS:

    -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
    -v, --verbose               increase verbosity
    -z, --compress              compress file data during the transfer
        --progress              show progress during transfer

 -a option does the following:

Recursive mode
Preserves symbolic links
Preserves permissions
Preserves timestamp
Preserves owner and group

You may also be interested in tools that can automate all this like mintbackup

share|improve this answer
    
Ahh thx! Is there also a way to exclude files that you have in the folder which you are backing up? So for instance "--exclude=/media" –  Kipt Scriddy Jun 8 '13 at 14:26
    
Yes, rsync can do everything. Have a look through the link I posted or man rsync, the option you are looking for is --exclude=media. –  terdon Jun 8 '13 at 14:29
    
Thank you. I am going to take a look at it right away! –  Kipt Scriddy Jun 8 '13 at 14:32
    
gzip uses the exact same "DEFLATE" algorithm as WinZip. –  grawity Jun 13 '13 at 14:04
1  
@terdon: Yes, really, to the point that you can use gunzip to extract a file from a .zip archive (although only the first one, since that's how gunzip always works). But on the other hand, Zip archives support several compression methods, some old and out-of-use (e.g. Reduce and Implode), some newer (bzip2 or PPMd) – see APPNOTE.TXT § 4.4.5 which is the official format description. However, Deflate is the most common one. zlib's website also confirms this. –  grawity Jul 11 '13 at 7:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.