10-07-2011
Copy duration of cp
Hello forum, i would like to ask if there's a way to view the remaining time of copying files (talking about copying gigabytes) while the cp commnad is running.
I'm using OpenBSD 4.9 -stable.
Thanx in advance.
Last edited by sepuku; 10-07-2011 at 10:09 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which has 3 coloumns emp_name, Joining_date, Designation.
abc 12/1/2001 SSE
def 2/25/2007 SE
ghi 3/18/2009 SA
abc 8/1/2008 SSE
def 2/13/2007 SE
ghi 3/24/2005 SA
I need to find out the emp who has been in the company for longest period(Till date).
Can I have any... (3 Replies)
Discussion started by: siba.s.nayak
3 Replies
2. Solaris
hi, i'm trying to figure out how to tell the amount of time a ufsdump of a directory takes. i use the below command:
echo "Starting Backup of u4" >> /backup/backup.log 2>&1
/usr/sbin/ufsdump 0uf /dev/rmt/0n /u4 >> /backup/backup.log 2>&1
echo "Finished Backup of u4" >> /backup/backup.log... (0 Replies)
Discussion started by: pinoy43v3r
0 Replies
3. Shell Programming and Scripting
Hi,
I am looking to write a script to kill the process which are running for more than 7 days.
So i have a command like
"ps -eo pid,etime,args | grep -i xxxx" ( process which has xxx in it and running for more than 7 days needs to be killed ).
When i exeucte the above command , i am... (2 Replies)
Discussion started by: forums123456
2 Replies
4. UNIX Desktop Questions & Answers
I have used the arecord command like this
arecord -d 1 test.wav
It is keep on waiting. I need to manually interrupt it by ctrl-c. Why it is not interrupting after one second?
The arecord version which I am using is :
arecord: version 1.0.23 by Jaroslav Kysela (3 Replies)
Discussion started by: thillai_selvan
3 Replies
5. Shell Programming and Scripting
..........................................................................................................................
03:40 Geonetric File from CCL Complete 03:40:59 03:41:08 00:00:09 00:00:01 N/A
005 sys_runccl ... (7 Replies)
Discussion started by: Daniel Gate
7 Replies
6. Shell Programming and Scripting
Hello All,
I have two strings with date and time as follows..
$starttime= "06/11/2013 ";
$starttime= "05:15";
$enddate="06/12/2013";
$endtime="04:45";
dates are in mm/dd/yyyy format and time in military format.
and I am looking the duration of time(in minutes) in between dates.
... (3 Replies)
Discussion started by: scriptscript
3 Replies
7. UNIX for Beginners Questions & Answers
Hi , How can I check that for a single process, for example pagent for how much duration this process was up or down and also I need multiple entries if this process was down or up multiple times. Please help. (3 Replies)
Discussion started by: Ashish Garg
3 Replies
8. Shell Programming and Scripting
I have a file with time in it. I need to find the duration between the timestamp by subtracting second row from third row and so on. and wherever it is more than 30 minutes it should display start and end time which have been subtracted
file :
00:44:11
00:44:11
00:44:13
00:44:13
00:46:51... (2 Replies)
Discussion started by: Muskaan
2 Replies
9. Shell Programming and Scripting
I have 2 variables
startTime='122717 23:20'
endTime='122817 0:40'
how can i get the elapsed duration as like "1 hour 20 minutes" ? (8 Replies)
Discussion started by: vikram3.r
8 Replies
10. Shell Programming and Scripting
did this function to generate the duration of all the video files in a folder or multiple folders, it works fine for my use (I am no Guru as you may have noticed) but when I give it a lot of folders the calculation get a bit borked.
If any good soul had the energy to look at it and give... (4 Replies)
Discussion started by: zouhair
4 Replies
LEARN ABOUT OSF1
timer_gettime
timer_settime(3) Library Functions Manual timer_settime(3)
NAME
timer_settime, timer_gettime - Obtains or sets the expiration time of the specified per-process timer (P1003.1b)
LIBRARY
Realtime Library (librt.so, librt.a)
SYNOPSIS
#include <time.h>
int timer_gettime (
timer_t timerid,
struct itimerspec *value);
int timer_settime (
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue);
PARAMETERS
timerid Specifies the timer ID for the timer whose expiration time is set or returned.
flags Specifies whether the timer is to be an absolute or relative timer.
*value Specifies a pointer to an itimerspec data structure.
*ovalue Specifies a pointer to the itimerspec data structure into which the time remaining on the previous timer is returned.
DESCRIPTION
The timer_gettime function returns the amount of time remaining in the current time interval before the expiration of the specified timer.
The timer_settime function sets the expiration time of the specified per-process timer, determines whether the timer is an absolute or rel-
ative timer, returns the time remaining (if any) on the previous specified timer, and arms the timer.
Both the timer_gettime and timer_settime functions use an itimerspec structure, which consists of the following members:
struct timespec it_interval;
struct timespec it_value;
Each timespec structure consists of the following members:
time_t tv_sec;
long tv_nsec;
Values specified for these members determine the duration of the timer intervals, as well as the start and end times.
Use the timer_gettime function to determine whether a per-process timer is still active. If the timer is disabled, zero is returned.
The timer_settime function sets the expiration time of the specified per-process timer and arms the timer. The TIMER_ABSTIME flag deter-
mines whether the timer is an absolute or relative timer. If the TIMER_ABSTIME flag is not set (flags=0), the timer is set relative to the
current time (a relative timer). In this case, the time until the next timer expiration equals the interval specified by the it_value mem-
ber of value. The timer expires in the specified number of seconds and nanoseconds from when the call was made.
If the TIMER_ABSTIME flag is set, the timer is set with a specified starting time (an absolute timer). In this case, the time until the
next timer expiration equals the difference between the absolute time specified by the it_value member of value and the current value of
the clock associated with the timer ID. The timer expires when the clock reaches the value specified by it_value member.
Times that are between two consecutive non-negative integer multiples of the resolution are rounded up to the larger multiple of the reso-
lution.
To disarm a timer, specify a value of 0 (zero) for the it_value member and call the timer_settime function.
The reload value to the timer is set to the value specified by the it_interval member of value. If the it_interval is zero, a one-shot
timer is specified. If the it_interval is non-zero, a periodic timer is specified.
RETURN VALUES
On a successful call to the timer_gettime and timer_settime functions, a value of 0 (zero) is returned.
On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred.
ERRORS
The timer_gettime and timer_settime functions fail under the following condition:
[EINVAL] The timerid argument does not correspond to an ID returned by timer_create and not yet removed by timer_delete.
Additionally, the timer_settime function can fail with this error if a value structure specified a nanosecond value less
than zero or greater than or equal to 1000 million.
RELATED INFORMATION
Functions: clock_gettime(3), timer_create(3)
Guide to Realtime Programming delim off
timer_settime(3)