Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to get the percentage of completion? during a copy! Post 302196380 by era on Sunday 18th of May 2008 04:59:42 AM
Old 05-18-2008
Welp, unless your version of cp has hooks for this, the best you can do is guess. It's probably more aggravating than helpful if the guesstimated remaining time is completely off base, so perhaps it's just better to display a spinning cursor.

You could copy a smaller file first to calibrate, and then extrapolate a time estimation from that, but what if the disk gets jammed or another process accesses the disk at the same time?

If you don't have dd, chances are any useful tools for cobbling together some eye candy won't be available either ... (I'd be hoping that dd is available if cp is, though.)

Another approach would be to run cp in the background and watch the size of the destination file, and calculate a percentage from that. I'd be nervous about putting cp in the background and lose on error checking etc just to get some pretty text on the screen, though.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file name completion

I'ld like to enable file name completion in ksh88 on AIX 5.2. My terminal is set to xterm. I've set the shell editor to emacs and ampped the arrow keys. Is there a way to map the tab key to a command like ESC= or any other file name completion command in emacvs that I may be not aware of since I'm... (1 Reply)
Discussion started by: rein
1 Replies

2. UNIX for Dummies Questions & Answers

Tab Completion on Solaris 10

Hi, Is there a way to turn on tab completetion on Solaris 10? (2 Replies)
Discussion started by: annointed3
2 Replies

3. Shell Programming and Scripting

Ensure the file completion ?

Hi, I would like to copy a file from one location to another. But that particular file is not fully loaded. I like to copy a file once it's fully loaded or complete file. How to ensure whether file is fully loaded or complete file?. -Thambi (5 Replies)
Discussion started by: thambi
5 Replies

4. UNIX for Dummies Questions & Answers

Job Completion Information?

Hi, I am trying to get some information on the jobs that are running. I have used the "ps" command, to get information such as 'cpu usage', 'username', 'pid', etc., I've also used the "bjobs" command to get information such as 'submit time' and 'start time'. The only thing I need now is to... (3 Replies)
Discussion started by: davidfrank
3 Replies

5. Shell Programming and Scripting

bash completion

hello, I have been trying for a couple days to figure this out to no avail. I am converting some csh code to bash. I have converted everything except the completion code. #bashrc (I set this alias in my bashrc) alias test='source ${PATH}/test.sh' #${PATH}/test.sh (returns some aliases and... (0 Replies)
Discussion started by: platypuus
0 Replies

6. UNIX for Dummies Questions & Answers

Background Process Completion

I have my unix machine configured to run locate.updatedb on login in the background and after it completes, when I run a command such as ls-- the console returns the results of ls and + Done sudo /usr/libexec/locate.updatedbIs there... (3 Replies)
Discussion started by: Prodiga1
3 Replies

7. Shell Programming and Scripting

zsh and host completion

Hi there is there a way i can add to my .zshrc so that when i type rsh <tab> it takes the name for a list of hosts i know it looks in .ssh/know_hosts but i want it for rsh and for a list that i supply thanks A (4 Replies)
Discussion started by: ab52
4 Replies

8. Shell Programming and Scripting

inotifywait to wait until completion

Hi, I am using inotifywait to monitor a directory where files are being transferred into. I want inotifywait to tell me when a file has been completely transferred not just part of it. I tried "create", "close" and "close_write" but it seems that inotifywait always gets triggered even if the... (4 Replies)
Discussion started by: jejeking
4 Replies

9. Shell Programming and Scripting

Identifying the file completion

Hi, A script is running for multiple databases so data is also being populated for multiple DBs in a.txt file. I need to rename this file once all the data is populated. Kindly suggest me How can I check once file is populated completely before renaming? Thanks in advance. (3 Replies)
Discussion started by: ravigupta2u
3 Replies

10. Shell Programming and Scripting

Bash-Completion, an example

Hello I've followed several bash-completion threads, usualy none were answered, because of obvious reasons. (of which i'm just aware since a day or a few) Non-the-less, because i was writing scripts, i never considered it to be possible to add this functionality. Also, because i though that... (0 Replies)
Discussion started by: sea
0 Replies
mzip(1) 						      General Commands Manual							   mzip(1)

Name
       mzip - change protection mode and eject disk on Zip/Jaz drive

Note of warning
       This  manpage  has been automatically generated from mtools's texinfo documentation, and may not be entirely accurate or complete.  See the
       end of this man page for details.

Description
       The mzip command is used to issue ZIP disk specific commands on Linux, Solaris or HPUX. Its syntax is:

       mzip [-epqrwx]

       Mzip allows the following command line options:

       e      Ejects the disk.

       f      Force eject even if the disk is mounted (must be given in addition to -e).

       r      Write protect the disk.

       w      Remove write protection.

       p      Password write protect.

       x      Password protect

       u      Temporarily unprotect the disk until it is ejected.  The disk becomes writable, and reverts back to its old state when ejected.

       q      Queries the status

       To remove the password, set it to one of the passwordless modes -r or -w: mzip will then ask you for the password, and unlock the disk.	If
       you have forgotten the password, you can get rid of it by low-level formatting the disk (using your SCSI adaptor's BIOS setup).

       The  ZipTools  disk shipped with the drive is also password protected.  On Dos or on a Mac, this password is automatically removed once the
       ZipTools have been installed.  From various articles posted to Usenet, I learned that the  password  for  the  tools  disk  is  APlaceForY-
       ourStuff.   Mzip  knows	about  this  password, and tries it first, before prompting you for a password.  Thus mzip -w z: unlocks the tools
       disk.  The tools disk is formatted in a special way so as to be usable both in a PC and in a Mac.  On a PC, the Mac filesystem appears as a
       hidden file named `partishn.mac'.  You may erase it to reclaim the 50 Megs of space taken up by the Mac filesystem.

Bugs
       This  command  is a big kludge.	A proper implementation would take a rework of significant parts of mtools, but unfortunately I don't have
       the time for this right now. The main downside of this implementation is that it is inefficient on some architectures  (several	successive
       calls to mtools, which defeats mtools' caching).

See Also
       Mtools' texinfo doc

Viewing the texi doc
       This  manpage  has  been automatically generated from mtools's texinfo documentation. However, this process is only approximative, and some
       items, such as crossreferences, footnotes and indices are lost in this translation process.  Indeed, these items have no appropriate repre-
       sentation  in  the manpage format.  Moreover, not all information has been translated into the manpage version.	Thus I strongly advise you
       to use the original texinfo doc.  See the end of this manpage for instructions how to view the texinfo doc.

       *      To generate a printable copy from the texinfo doc, run the following commands:

		     ./configure; make dvi; dvips mtools.dvi

       *      To generate a html copy,	run:

		     ./configure; make html

	      A premade html can be found at: `http://mtools.linux.lu' and also at: `http://www.tux.org/pub/knaff/mtools'

       *      To generate an info copy (browsable using emacs' info mode), run:

		     ./configure; make info

       The texinfo doc looks most pretty when printed or as html.  Indeed, in the info version certain examples are difficult to read due  to  the
       quoting conventions used in info.

mtools-3.9.8							      02Jun01								   mzip(1)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy