10-13-2005
Insert Time and Date Stamp
I have a directory with following files in it
ABC.000.DAT
ABC.001.DAT
ABC.002.DAT
ABC.003.DAT
I want to insert time and date stamp in file names like
ABC.000.YYYYMMDDHHMM.DAT
I able to insert the time and date stamp at the end of filename
Kindly help
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: Xenon
1 Replies
2. Shell Programming and Scripting
I'm trying to write a script that checks the DTS of a file the compares it to the current time. If greater that 60 mins has gone by and the file has not been written to alert.
So far I have the time pulled from the file but I dont know how to compare the times against a 60 min difference.
... (2 Replies)
Discussion started by: jarich
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Wondering if there is have a date added at the end of a test string. I have a hypothetical text file day one:
John
Paul
George
When the file day one is output, I'd like it to read something like this:
John 101406
Paul 101406
George 101406
Day two, when the same text file... (0 Replies)
Discussion started by: JimmyFlip
0 Replies
4. UNIX for Advanced & Expert Users
Hi,
We are using RSYNC for syncing remote directories and working great. Our requirement is to have the destination files with date/time stamp of when they're copied on to the destination server, NOT the date/time stamps of source files/directories.
As RSYNC, by default, preserving the same... (4 Replies)
Discussion started by: prvnrk
4 Replies
5. UNIX for Dummies Questions & Answers
Hi
When i do ls -ltr <file1> then it shows me the date and time of the file
if - for whatever reason file has future date/time stamp then ls -ltr is not showing the time, it just shows only date part ... even if time is ahead by 2 hr than current time.
suppose a file was copied from INDIA... (3 Replies)
Discussion started by: reldb
3 Replies
6. Shell Programming and Scripting
Hi
I use "touch -t xxxxxxxx" command to set date/time stamp of a file. My requirement is to read the date/time stamp of a file and apply it to another file.
Is there anyway to do it simple instead of manually taking date/stamp of first file?
TIA
Prvn (2 Replies)
Discussion started by: prvnrk
2 Replies
7. Shell Programming and Scripting
Hi!
Please see our current script:
#!/usr/bin/ksh
if (egrep "This string is found in the log" /a01/bpm.log)
then
mailx -s "Error from log" me@email.com, him@email.com </a01/bpm.log
fi
To the above existing script, we need to add the following change:
1) After finding the string,... (7 Replies)
Discussion started by: atechcorp
7 Replies
8. Emergency UNIX and Linux Support
hi,
i have some file names. my file names are as follows:
c_abc_new.txt.xls
c_def.txt.xls
i want to append date time stamp in the below manner.
c_abc_new_YYYYMMDD_HH24MISS.txt.xls
c_def_YYYYMMDD_HH24MISS.txt.xls
check the two input file names, they differ in naming. the 1st file name... (9 Replies)
Discussion started by: Little
9 Replies
9. Shell Programming and Scripting
Hi Folks,
Need a clarification on files with date and time stamp.
Here is my requirement. There is a file created everyday with the following format "file.txt.YYYYMMDDHHMMSS".
Now i need to check for this file and if it is available then i need to do some task to the file.
I tried... (6 Replies)
Discussion started by: jayadanabalan
6 Replies
10. Shell Programming and Scripting
Help with Perl script :
I have a web.xml file with a line
<display-name>some_text_here</display-name>
Need to append the current date and time stamp to the string and save the XML file
Something like
<display-name>some_text_here._01_23_2014_03_56_33</display-name>
-->Finally want... (5 Replies)
Discussion started by: gaurav99
5 Replies
LEARN ABOUT SUNOS
dat_rsp_create
dat_rsp_create(3DAT) Direct Access Transport Library Functions dat_rsp_create(3DAT)
NAME
dat_rsp_create - create a Reserved Service Point
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include <dat/udat.h>
DAT_RETURN
dat_rsp_create (
IN DAT_IA_HANDLE ia_handle,
IN DAT_CONN_QUAL conn_qual,
IN DAT_EP_HANDLE ep_handle,
IN DAT_EVD_HANDLE evd_handle,
OUT DAT_RSP_HANDLE *rsp_handle
)
PARAMETERS
ia_handle Handle for an instance of DAT IA.
conn_qual Connection Qualifier of the IA the Reserved Service Point listens to.
ep_handle Handle for the Endpoint associated with the Reserved Service Point that is the only Endpoint that can accept a Connection
Request on this Service Point. The value DAT_HANDLE_NULL requests the Provider to associate a Provider-created Endpoint
with this Service Point.
evd_handle The Event Dispatcher to which an event of Connection Request arrival is generated.
rsp_handle Handle to an opaque Reserved Service Point.
DESCRIPTION
The dat_rsp_create() function creates a Reserved Service Point with the specified Endpoint that generates, at most, one Connection Request
that is delivered to the specified Event Dispatcher in a Notification event.
RETURN VALUES
DAT_SUCCESS The operation was successful.
DAT_INSUFFICIENT_RESOURCES The operation failed due to resource limitations.
DAT_INVALID_HANDLE The ia_handle, evd_handle, or ep_handle parameter is invalid.
DAT_INVALID_PARAMETER The conn_qual parameter is invalid.
DAT_INVALID_STATE Parameter in an invalid state. For example, an Endpoint was not in the Idle state.
DAT_CONN_QUAL_IN_USE Specified Connection Qualifier is in use.
USAGE
The usage of a Reserve Service Point is as follows:
o The DAT Consumer creates a Local Endpoint and configures it appropriately.
o The DAT Consumer creates a Reserved Service Point specifying the Local Endpoint.
o The Reserved Service Point performs the following:
o Collects native transport information reflecting a received Connection Request.
o Creates a Pending Connection Request.
o Creates a Connection Request Notice (event) that includes the Pending Connection Request (which includes, among others, Reserved
Service Point Connection Qualifier, its Local Endpoint, and information about remote Endpoint).
o Delivers the Connection Request Notice to the Consumer-specified target (CNO) evd_handle. The Local Endpoint is transitioned from
Reserved to Passive Connection Pending state.
o Upon receiving a connection request, or at some time subsequent to that, the DAT Consumer must either accept() or reject() the Pending
Connection Request.
o If accepted, the original Local Endpoint is now in a Connected state and fully usable for this connection, pending only native trans-
port mandated RTU messages. This includes binding it to the IA port if that was not done previously. The Consumer is notified that the
Endpoint is in a Connected state by a Connection Established Event on the Endpoint connect_evd_handle.
o If rejected, the Local Endpoint point transitions into Unconnected state. The DAT Consumer can elect to destroy it or reuse it for
other purposes.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard: uDAPL, 1.1, 1.2 |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
libdat(3LIB), attributes(5)
SunOS 5.10 16 Jul 2004 dat_rsp_create(3DAT)