General :: Calculate Local Time In Seconds?

Sep 3, 2010

I`m looking to calculate my Local Time in seconds from APOC - 1970.I found only - date +%s -> that display the UTC and not my Local Time.

View 3 Replies


ADVERTISEMENT

General :: Calculate Duration In Seconds In Bash ?

Nov 15, 2010

I would like to subtract the end time with a start time in bash. How can I do it?

Here's a script of example of what I want:

View 8 Replies View Related

General :: Calculate Time Period In Scripting

Mar 16, 2011

Now i am writting one bash script. in that my requirement is i need to create one directory and that the directory details to be stored in one file Ex. date/time and all in one file. after that i need to delete the folder automatically exactly after 3months. between these time period in 2month itself i need to send one mail to admin "regarding this still one month only more to delete the folder" . is it possible to do like that date calculation in script.

View 10 Replies View Related

General :: Replace Time Format To Seconds?

Jun 30, 2011

I have log file in formatJun/26/2011 01:17:50 wireless ....Jun/26/2011 18:25:15 wireless ....Jun/26/2011 22:34:43 wireless ....I need to put this in format ( only seconds insted hours:minutes:secondes)Jun/26/2011 4670s wireless ....Jun/26/2011 66315s wireless ....Jun/26/2011 81283s wireless ....If i useawk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }' output iz only 4670,66315,81283....I try to use something likesed "s/ ([0-9][0-9]):([0-9][0-9]):([0-9][0-9] )/`awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }'` /g"but doesn't work

View 2 Replies View Related

General :: Get The Number Of Leap Seconds In Time ( Time_t)?

Mar 31, 2009

time() API gives the number of seconds since 1970 Jan 1st 00:00:00 without considering leap seconds. How to get the number of leap seconds which needs to be considered in the value returned by time()..(gmtime will convert time_t to struct tm* and considers leap seconds. I am trying to write an API which will do the same function as gmtime)

View 5 Replies View Related

General :: Make Second Program Running With CPU Time Limit 2 Seconds?

May 16, 2011

Linux bash inline command to execute a program and limit the resource.As I know, to limit the resource I can use ulimit command.But, the problem is when I set the CPU time limit 1 second, and then I want to execute another program with CPU limit 2s, the ulimit command return an error like this: bash: ulimit: CPU time: cannot modify limit: Operation not permitted and absolutely my program killed in 1 second.So, How can I make the second program running with the CPU time limit 2 seconds?

View 3 Replies View Related

Programming :: Clock() - Calculate How Much Time Does My Program Run?

May 11, 2011

im trying to calculate how much time does my program run, use very simple script

clock_t end, start;
start= clock();
int i;
printf("initial %d
",(int)start);
[Code]....

but it outputs 0 all the time. cant figure out where could be the problem.

View 2 Replies View Related

Programming :: Calculate The Time Taken For A Sample Program To Run?

Apr 24, 2011

i have the example code below, i want to calculate the time taken for a sample program to run. but i keep getting undefined reference error.

#include <sys/time.h>
#include <iostream>
int main(int argc, char **argv) {
struct timeval startTime;
struct timeval endTime;

[Code]...

View 9 Replies View Related

Programming :: Set Time Using Settimeofday But It Sets Local Time?

Jan 12, 2010

I am trying to set time using settimeofday in linux. But it sets local time. i.e works like SetLocalTime in windows. But I want to set system time(like SetSystemTime in windows). I could'nt find no other api in linux. What should i do? I had tried with mktime/gmtime apis

View 3 Replies View Related

General :: Need To Synchronize Local And Remote Directories In Real Time

May 18, 2010

I'd like to have a copy of a web site on my local drive. Then when I make changes to that copy, have those changes automatically updated on the site's server. Ideally I'd like to tell it to only do this for certain file types. Does anybody know of a way to do this with Linux?

View 2 Replies View Related

Networking :: NTP Can't Use Its Local Time As Its Time Reference?

Jul 23, 2010

I use Debian Lenny .I installed NTP server on my debian and take following changes to /etc/ntp.confserver 127.127.1.0fudge 127.127.1.0 stratum 10but when I try to sync time from clients I cant and I see following error message :no suitable server found for synchronization

View 1 Replies View Related

Software :: Get The Current Time With Nano Seconds On A Box Using C++?

Jan 9, 2009

I need to know how to get the current time with nano seconds on a linux box using c++?

View 3 Replies View Related

Fedora :: Gnome-3 - How To Make The Time Display Seconds

Aug 2, 2011

Is there a way for the time at the top of the screen to display seconds as well as the date ?

My clock seems to be about :40 seconds off... before i upgraded from f-13 i had my time controlled by ntp(how to verify ntp is enabled) ? even with network time = yes, it seems to lag a little.

I figured out the network time. it is under a whole separate menu for some reason.

Is there a way to get weather/ temperature like in classic gnome ?

Rite now my clock reads: tue 3:50 pm...Is there a way i can make it read: tue, aug 20, 2011 3:50:45 pm

View 5 Replies View Related

Ubuntu Installation :: Boot Time After Upgrading To 10.04 Is 29 Seconds?

May 4, 2010

I know this isnt normal for everyone but im getting a 29 to 30 second bootup on 10.04 from grub to login screen.. i installed boot up manager and disabled some of the things listed on a few recommendation pages on google where would i begin to figure this out? before i upgraded i was booting up at like 10 seconds tops..

View 1 Replies View Related

Ubuntu :: 10.10 Taking Longer Time (90 Seconds) To Boot

Nov 7, 2010

My ubuntu(10.10) installation takes a relatively longer time (90 seconds) to boot. I think part of the problem might be related to an error message during boot related to usb drivers.
Code:
[2.717076] usb 4-1: new low speed USB device using ohci_hcd and address 2
[3.244051] usb 4-2: new full speed USB device using ohci_hcd and address 3
[12.029046] /build/buildd/linux-2.6.35/drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed
I have attached the relevant part of dmesg output also.

View 6 Replies View Related

Ubuntu :: Every Time Play Any Video It's Forwarding Few Seconds Itself

Dec 4, 2010

i use Totem movie player every time i play any video it's forwarding a few seconds it self.

View 3 Replies View Related

Ubuntu :: Unrepairable Thunderbird Installation - Freezes After 10 Seconds Every Time

Apr 28, 2010

I've been using Thunderbird 3.0.x for some time and found in it a good replacement of TheBat. However, few days ago, ubuntu being ubuntu crashed and since then, Thunderbird freezes after 10 seconds every time I try to start it, sending CPU usage through the roof. I have 8 imap accounts in it and my profile folder is ~2.8gb I tried purging the installation. I tried fsck on all partitions. Windows Thunderbird using the same profile folder works just fine.

View 6 Replies View Related

OpenSUSE Hardware :: Radeon Driver And ATI ES1000 - Flickers One Time Each 4 Of 5 Seconds

Apr 8, 2011

I upgraded a HP Proliant server to openSUSE 11.4 (X86-64) with KDE, and I'm encountering various graphical problems. This machine's been running SUSE versions since 11.0 on similar hardware with few major issues, and I did the 'upgrade' by a new install keeping only /home partition intact. This Server has 10GB memory. It has a PCI ATI ES1000 with 64MB and uses the radeon driver. It boots up fine under the monitor's correct resolution of 1600*1000, but

1) It flickers one time each 4 of 5 seconds
2) during works more and more memory is used : starting at 9% and going up to 51% after 20 minutes and I receive then allocation error in /var/log/messages

[Code]...

View 9 Replies View Related

Ubuntu :: Gparted-instant Crash After About 3 Seconds Of Grayed Out Screen Time

Nov 24, 2010

ive searched the forums and web for info on this but i am stumped.not unusual since i started to use linux.gparted crashes after about 3 seconds of grayed out screentime.here is my terminal readout after entering sudo gparted command.tenza@tenza-desktop:~$ sudo gparted

[Code]....

View 1 Replies View Related

Fedora :: 11 Clock Showing Local Time + 2h

Aug 10, 2009

Before my windows clock was at local time + 2h. Now my Win clock is ok but my F11 clock is at local time +2h. What happened?!

View 9 Replies View Related

Ubuntu :: System Clock Will Not Set To Local Time

Aug 15, 2010

Try as I might I cannot seem to get the system clock to display local time. It looks like it's stuck on GMT. In the System>Administration>Time and Date I have my local time zone set correctly and also set to update automatically with an appropriate time server selected. It still displays my local time +5 hours (I'm central time, USA).

View 6 Replies View Related

Server :: NTPD Giving Non Local Time - How To Set

Feb 10, 2011

NTPD on Fedora 14.

View 2 Replies View Related

General :: How To Calculate Video Resolutions

Jun 2, 2011

I am familiar with common video resolutions like 320x240, 640x480 and 720x480. Sometimes I want to use other video resolutions when encoding videos. Is there a formula to calculate the unknown value for the heightxwidth if one value is supplied? For example, if I want my video to be 480xWidth, what value should Width be to get proper aspect.

View 2 Replies View Related

General :: Looping Through Csv File To Calculate Avg/min/max?

Sep 1, 2010

I have a csv file (id, loc, timestamp, impressions) that I need to derive some low-level calculations from. Im ok with basic sort and grep operations, but this one is challenging my feeble scripting skills (normally I�d throw it into a spreadsheet, but in this case Id like to ultimately create a script that I could automate). Ive already used cat/sort to order the csv file first on location and then timestamp so it looks like this:

Abt001, AA, 2009-01-01 10:51:00, 231
Cup002, AA, 2009-01-01 10:54:00, 3
Saf001, AB, 2009-01-01 10:51:00, 25

[code]....

What Id like to do is output to file a record of the total, min, and max number of impressions for each location. , e.g.

AA6504 3231
AB252525
AC37925109
ZZ35512341

how to do this and Im kind of stuck on how to approach it I think the combined steps of looping through the locations along with the min/max/sum calculations are throwing me. Eventually Id also like to do additional calculations like average, ect. but I think I can figure that out on my own if I can just get this part down.

View 10 Replies View Related

General :: Calculate The Hours Usage Per Day Over A Certain Period?

Dec 13, 2010

Between the dates 21-June-2007 to 12-December-2010 there are 1270 days. If the total cumulative time a hard drive has been active is 344 days (found this via Disk Utility in Ubuntu 10.10) since it was bought 1270 days ago. What is the average usage hours per day?

View 2 Replies View Related

Debian :: Set System Time To Local Region Using Tzselect Command

Jun 14, 2011

i have a debian 5 vps system.. it reports the time as beeing one hour behind, i have tried to change this by setting the time to GMT+1 and setting the time to my local region (Europe-Brittian) using the tzselect command but none get the time to the correct time, one hour ahead of the current time.

View 3 Replies View Related

Ubuntu :: Won't Gnome Panel Clock Show Local Time / Why Is So?

Sep 30, 2010

When I travel, I would like to tell my laptop that I, as a user, am in a different time zone that what the OS may think is local. And I would like the clock on my desktop (default Gnome bar date/time display) to show the local time.

Instead, I currently have to use sudo and change the system time... (click on the clock, choose time settings, set system time -- there are no other choices given). The applet thing allows me to add other locations, but they only show up if I click on the icon, as extra times below the main one.

Am I missing something? Using the wrong app?

View 9 Replies View Related

General :: Calculate Total Memory Consumed By User?

Sep 20, 2010

is there a way to calculate the total memory consumed by user ?

View 12 Replies View Related

General :: Calculate Usable Bytes On A Disk Partition?

Mar 10, 2010

How do you calculate the number of usable bytes on a disk partition? When I do an fdisk -l I get this:

Disk /dev/md0: 192.0 GB, 192069500928 bytes
2 heads, 4 sectors/track, 46891968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

[code]...

View 7 Replies View Related

General :: Mapping With Series From Master File And Calculate Count?

Sep 7, 2010

My shell script is calculating the count of each shortcode series wise whose sample output is as follows:

Code:

56882
9124 1
9172 1
9173 4

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved