I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second.
Any ideas... (1 Reply)
I want to copy a file to another file so that the current time and date are in the file name. For example I want to copy file profit.txt to a file name in the format
of profit_YYYYMMDDHHmm.txt where YYYY is year, MM is number of the month DD is the number of day of the month, HH is the hour of... (2 Replies)
Hi,
I wrote a small perl script in unix that searches in a file and saves some information in a separate file. Since this is a log file, I would like to have the date added to file name. I have no idea where to start.
output:
log_010907.txt
thanks
ken (8 Replies)
I have the following file and need to extract date and time part for each record. Pl. could anyone provide an shell script which could be used to do it. Here is the file:
/rgrdev/pdsud2/unx/agc/src/agcmst:
/rgrsrc/pdspms/unx/agc/src/s.agcmst.for
agcmst.for 420.20 8/4/07 18:30:53
... (7 Replies)
Hi,
I'm trying to accomplish the following and would like some suggestions or possible bash script examples that may work
I have a directory that has a list of log files that's periodically dumped from a script that is crontab that are rotated 4 generations. There will be a time stamp that is... (4 Replies)
Hi,
I have a file where there is a date and time field, the format for it is yyyy-mm-dd hours:mins:sec
the position of date field may vary anywhere in the line and it might be different and it is specified along with the variable AppTimeStamp
how do i extract date and time both from the... (5 Replies)
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)
Hi,
I've been trying (and failing miserably) all morning to strip from a CSV file the time from it.
Can somebody point me in the right direction on how to do this using sed or awk?
The file looks like:
"James","07/20/2009-14:40:11"
"Steve","08/06/2006-02:34:37"... (5 Replies)
Hi All,
i wanted to add date and time to the file names in the same directory so lets say a file in the directory is test.txt then after running the shell script it should be test-15-11-2010.txt.
So I used the following script which works,
#!/bin/bash
thetime=`date +%Y-%m-%d--%H:%M:%S`... (7 Replies)
Discussion started by: cc_at_work
7 Replies
LEARN ABOUT DEBIAN
dbix::class::timestamp
DBIx::Class::TimeStamp(3pm) User Contributed Perl Documentation DBIx::Class::TimeStamp(3pm)NAME
DBIx::Class::TimeStamp - DBIx::Class extension to update and create date and time based fields
DESCRIPTION
Works in conjunction with InflateColumn::DateTime to automatically set update and create date and time based fields in a table.
SYNOPSIS
package My::Schema;
__PACKAGE__->load_components(qw( TimeStamp ... Core ));
__PACKAGE__->add_columns(
id => { data_type => 'integer' },
t_created => { data_type => 'datetime', set_on_create => 1 },
t_updated => { data_type => 'datetime',
set_on_create => 1, set_on_update => 1 },
);
Now, any update or create actions will update the specified columns with the current time, using the DateTime inflator.
This is effectively trigger emulation to get consistent behavior across databases that either implement them poorly or not at all.
METHODS
get_timestamp
Returns a DateTime object pointing to now. Override this method if you have different time accounting functions, or want to do anything
special.
The date and time objects in the database are expected to be inflated. As such you can be pretty flexible with what you want to return
here.
AUTHOR
J. Shirley <jshirley@gmail.com>
CONTRIBUTORS
Florian Ragwitz (Porting to DBIx::Class::DynamicDefault)
LTJake/bricas
COPYRIGHT & LICENSE
Copyright 2009 J. Shirley, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-09-05 DBIx::Class::TimeStamp(3pm)