Find the answer to your Linux question:
Results 1 to 5 of 5
Is there any way to display the time taken for creation of tar file? Note : i want to display it before completion . Regards RajathM...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    6

    Time estimation

    Is there any way to display the time taken for creation of tar file?

    Note : i want to display it before completion .


    Regards
    RajathM

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Code:
    man time
    -OR-

    Script outline:

    let x=date
    tar
    let y=date
    let z=y-x
    Etc...

  3. #3
    Just Joined!
    Join Date
    Aug 2008
    Posts
    6
    thanks for the reply.

    issue is i want to diplay approximate time of the tar before tarring.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Tar is taking multiple files and combining them into one...

    This is mostly bound by disk I/O - does tar have any idea how much data and how fast your disks are? What if you have a *really* slow CPU which could affect things as well?

    Simply put - no, tar doesn't take these things into account.

    IF you have a *best guess* on your system where you measure and say, on average, 5GB takes ~5 min to tar, you can write your script to check the amount of data, scale the average, and then throw out an estimate before it calls tar.

    For all of the tar options:

    Code:
    man tar

  5. #5
    Just Joined!
    Join Date
    Aug 2008
    Posts
    6
    Is dere any examples as such to do this? if so please share it, it will more helpful to me , to resolve some issue.

    Could you please reply on this.....

    regards
    Rajath

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...