Quite sparse a request, no? What tools would be preferred? What would the data be used for, and how? How or where to store the data? In a file? In stdout (to be piped into sth.)? In shell variables?
Suppose I have a unix file which contain a lost of 60 files like
filename1
filename2
...
..
...
filename60
I want to write a unix script that will pick up first 10 files in first run
10-20 files in 2 run
20-30 files in 3 run
30-40 files in 4 run
40-50 files in 5 run
50-60 files in 6... (1 Reply)
I have a requirement of checking the current system time and performing certain actions in a shell script. example:
if the current system time is greater than 1400 hrs, then perform step 1,2,3
if the current system time is greater than 1000 hrs, then perform step 1,2
if the current system time... (2 Replies)
i am using function
gethrtime() in sun solaries
to get the time independent of the system time.Problem with this function is if we restart the system time will change to '0'.is there any other way to resolve this problem.
thanks & regards
suresh (3 Replies)
Hi All
I am stuck in a problem and wants help
What i want to do is I have a directory(say name of that directory is outdir) In that directory(outdir) the files come after some gap of time by some processes.
What i want to do is i want to list all the files in that directory after the given... (2 Replies)
On Solaris 10 server the system date won't match with the timestamp on files created by a cron jobs, Please help
here is what i get when i check for system date
infodba-ie10ux014:/tcpdv1_ie10/tcadmin/bin\n\r-> date
Tue Apr 24 15:27:43 GMT 2012at same time i executed a cron job, and checked... (4 Replies)
We would be migrating UNIX file system to Linux file system.
We do have many directory and sub directories with files.
after migrating unix to linux file system , i want to make sure all the files has been copied ? What would be the best approach to validate directory ,sub-directory and file... (1 Reply)
Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1) abc_20171204_052389.dat
2)abc_20171204_052428.dat
DON'T modify... (23 Replies)
Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second.
Normally, when the Arduino starts... (9 Replies)
Discussion started by: Neo
9 Replies
LEARN ABOUT NETBSD
inittodr
INITTODR(9) BSD Kernel Developer's Manual INITTODR(9)NAME
inittodr -- initialize system time
SYNOPSIS
void
inittodr(time_t base);
DESCRIPTION
The inittodr() function determines the time and sets the system clock. It tries to pick the correct time using a set of heuristics that
examine the system's battery-backed clock and the time reported by the file system, as given in base. Those heuristics include:
o If the battery-backed clock has a valid time, and is not significantly behind the time provided by base, it is used.
o If the battery-backed clock does not have a valid time, or is significantly behind the time provided in base, and the time provided in
base is within reason, base is used as the current time.
o If the battery-backed clock appears invalid, and base appears non-sensical or was not provided (was given as zero), an arbitrary base
(typically some time within the same year that the kernel was last updated) will be used.
Once a system time has been determined, it is stored in the time variable.
DIAGNOSTICS
The inittodr() function prints diagnostic messages if it has trouble figuring out the system time. Conditions that can cause diagnostic mes-
sages to be printed include:
o There is no battery-backed clock present on the system.
o The battery-backed clock's time appears nonsensical.
o The base time appears nonsensical.
o The base time and the battery-backed clock's time differ by a large amount.
SEE ALSO clock_ymdhms_to_secs(9), resettodr(9), time_second(9)BUGS
Some systems use heuristics for picking the correct time that are slightly different.
BSD September 6, 2006 BSD