How to pick only the files which are generated in one hour?
Hello Masters,
I need one help.
I want to copy the files which are continuously generating on one server.
But this would be on hourly basis.
e.g.
From above first I need to copy the files which are generated between Feb 12 03:00 to Feb 12 03:59.
and so on.
That means in 24 hrs my script will copy 24 times.
I need this on daily basis.
I will set a cronjob for this.
But not sure how to pick.
Please help me over here so I can copy the files on ourly basis.
Thanks in advance
Last edited by Scrutinizer; 02-11-2013 at 09:17 AM..
Reason: code tags
Hi All,
I'm working on a ftp shell script in which I'm tranfering files from one sever to another using ftp.
Some program generates files at undefined time & throughout the day.
I have to transfer the files time to time.. i.e. once the file is generated, it should be transfered at the very... (3 Replies)
Hi All,
I was checking some of the files and I got the following entries:-
===============
v, 664, serv, serv, version.txt, exe
L, 775, serv, serv, start.sh, eventserv
================
Could someone please tell me what does the type"v" and "L" represent to.
I have not... (2 Replies)
I need a scriptto print only those files from a list of files starting with STMT* which are not of zero bytes ...i.e they have some size
if these are the files
631
-rw-r--r-- 1 assrisa assrisa 39099 Aug 19 07:16 STMT_05_D1090819_T071320
-rw-r--r-- 1 assrisa assrisa 0 Aug 19... (2 Replies)
Hi,
We have an application ASPA . The application related processes are running in /ASPA/bin directory . now whenever a process terminates abruptly , a core file should be generated (correct me if i am wrong) in the
/ASPA/bin directory . But i am not able to see any such files . The... (4 Replies)
I was trying to figure out in Korn shell but this may apply elsewhere how to generate a list of files from a directory created in the last 10 seconds or less. I have used the find command in the past with -mtime which is measured in days to get a list of files older than say 7 days for example. ... (1 Reply)
Hi
I have the following files generated by different users on a directory
-rw-rw-r-- 1 NAME1 database03 809 Nov 17 10:41 PCAS_CARD_TRANS_OFF.1111171041.lg
-rw-rw-r-- 1 richard ccsdba 10968411 Nov 17 10:43 load_123_RX0_0.1111171016.lg
-rw-rw-r-- 1 DEV db03 10713 Nov 17... (5 Replies)
I would like to find the Files which are generated today in the current directory:
I use the commad ls -lrt * | egrep " `date "+%b"` * `date "+%d"`
to acheive this. Is there any better way to acquire the same.
Multiple answers will be great. Thanks (3 Replies)
Hi Guys,
I am developing a script to monitor log file Generated every hour.
When creating a new file scripts not working.
My Code . I want to monitor GatewayTransaction.yyyymmdd-hh.log
while true; do newdate=$(date '+%Y%m%d') ; nowdate=$(date '+%Y%m%d-%H.log'); tail -f... (7 Replies)
Hello please help me on this,
pick the last one hour lines from the log, which have the prefix time format like this.
log message
log message
i tried to do grep, but that failed.
my code
grep '(date +)' log_file_path
This checking only the current time stamp. How to get the log... (16 Replies)
Discussion started by: santosh2626
16 Replies
LEARN ABOUT DEBIAN
fake-hwclock
FAKE-HWCLOCK(8) System Manager's Manual FAKE-HWCLOCK(8)NAME
fake-hwclock - Control fake hardware clock
SYNOPSIS
fake-hwclock [ command ] [ force ]
BACKGROUND
Many embedded Linux systems do not have a functional hardware clock. Either they simply don't have a hardware clock at all or they have a
hardware clock but it is not usable (e.g. because Linux doesn't know how to use it or because no battery is present).
This can lead to time moving backwards to some default value (often 1970) when the system is rebooted. Since lots of software assumes that
time only moves forward this is a bad thing. NTP can (and should where practical) be used to sync with an external timeserver but it is not
available early in the boot process and may be unavailable for other reasons.
DESCRIPTION
fake-hwclock sets and queries a fake "hardware clock" which stores the time in a file. This program may be run by the system administrator
directly but is typically run by init (to load the time on startup and save it on shutdown) and cron (to save the time hourly).
If no command is given then fake-hwclock acts as if the save command was used.
COMMANDS
save Save the time to the file.
load Load the time from the file. If force is specified fake-hwclock will move the clock either backwards or forwards. Otherwise it will
only move it forwards.
FILES
/etc/fake-hwclock.data
The file used to store the time
/etc/init.d/fake-hwclock
The init script used to run fake-hwclock on startup and shutdown
/etc/default/fake-hwclock
Settings file for the init script.
/etc/cron.hourly/fake-hwclock
Cron job used to save the time hourly
ENVIRONMENT VARIABLES
FILE set the file used by fake-hwclock
RETURN VALUES
1 is returned for invalid commands. 0 is returned in all other cases.
BUGS
This approach can only provide a crude approximation of what a real hardware clock provides. Use of NTP or another method to keep the time
in sync is strongly advised.
Debian 5 April 2012 FAKE-HWCLOCK(8)