Can I determine when the particular file was created, in korn-shell. Can please someone help me. If possible please mail the solution to me.
my mail id: bharat.surana@gmail.com (1 Reply)
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Hello, new to this forum, I'm running Ubuntu 9.10 i386. I've search and found some relevant info on how to do this but I haven't been able to figure it all out. I'm trying to output my mythtv pvr's upcoming schedule but I'd like to change the dates from 2009-10-30 -> today, 2009-10-31 -> tomorrow... (4 Replies)
I need to increment a date value through shell script.
Input value consist of start date and end date in DATE format of unix.
For eg.
I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr.
The output must look like
1/1/09
2/2/09
.
.
.
31/1/09
.
.
1/2/09
.
28/2/09... (1 Reply)
Hello,
I need to create a shell script that appends a filename to create a name with the date and time appended that is guaranteed to not exist. That is, the script insures you will not overwrite a file with the same name. I am lost with this one. I know I need to use date but after that I am... (3 Replies)
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Hi,
One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Hi Community!
Following on from this code in another thread:
#!/bin/bash
file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`
file_date=`/bin/date -d "$file_string"`
file_epoch=`/bin/date -d "$file_string" +%s`
now_epoch=`/bin/date +%s`
if
then
#let... (2 Replies)
Discussion started by: Greenage
2 Replies
LEARN ABOUT DEBIAN
datefudge
DATEFUDGE(1) Debian DATEFUDGE(1)NAME
datefudge - pretend the system time is different
SYNOPSIS
datefudge [-s|--static] at_date program [arguments ...]
DESCRIPTION
datefudge is a small utility that pretends that the system time is different by pre-loading a small library which modifies the time(2),
gettimeofday(2) and clock_gettime(2) system calls.
OPTIONS --static, -s
set date as a `static' one. The above mentioned system calls will always return the date passed as a parameter of the program
regardless of time passing. See EXAMPLES below.
--help, -h
print short usage information and exit.
--version, -v
print version information and exit.
EXAMPLES
Basic example:
$ datefudge "2007-04-01 10:23" date -R
Sun, 01 Apr 2007 10:23:00 +0200
Non-static vs. static example:
$ datefudge "2007-04-01 10:23" sh -c "sleep 3; date -R"
Sun, 01 Apr 2007 10:23:03 +0200
$ datefudge --static "2007-04-01 10:23" sh -c "sleep 3; date -R"
Sun, 01 Apr 2007 10:23:00 +0200
AUTHOR
Written by Matthias Urlichs <smurf@noris.de>. Modified by Robert Luberda <robert@debian.org>.
BUGS
There is no attempt to make this change undetectable by the program. In particular, file modification times are not modified.
COPYRIGHT
Copyright (C) 2003 by Matthias Urlichs.
Copyright (C) 2008-2011 by Robert Luberda.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You may redistribute copies of datefudge under the
terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
SEE ALSO ld.so(1), time(2), gettimeofday(2), clock_gettime(2)datefudge 1.17 June 23th, 2011 DATEFUDGE(1)