Sponsored Content
Full Discussion: Insert Time and Date Stamp
Top Forums Shell Programming and Scripting Insert Time and Date Stamp Post 86357 by aajmani on Thursday 13th of October 2005 12:01:55 PM
Old 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

File date and time stamp

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

Date Time Stamp

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

Date/Time Stamp

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

rsync - date/time stamp

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

ls -ltr for a future date/time stamp file

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

Set date and time stamp of one file to another

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

If(Condition) Rename a file with (Date+Time) Stamp

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

How to append date and time stamp before the two extensions?

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

Files with date and time stamp

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

Perl:Script to append date and time stamp

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
dat_ia_close(3DAT)				     Direct Access Transport Library Functions					dat_ia_close(3DAT)

NAME
dat_ia_close - close an IA SYNOPSIS
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_ia_close ( IN DAT_IA_HANDLE ia_handle, IN DAT_CLOSE_FLAGS ia_flags ) PARAMETERS
ia_handle Handle for an instance of a DAT IA. ia_flags Flags for IA closure. Flag definitions are: DAT_CLOSE_ABRUPT_FLAG Abrupt close. Abrupt cascading close of IA including all Consumer created DAT objects. DAT_CLOSE_GRACEFUL_FLAG Graceful close. Closure is successful only if all DAT objects created by the Consumer have been freed before the grace- ful closure call. Default value of DAT_CLOSE_DEFAULT = DAT_CLOSE_ABRUPT_FLAG represents abrupt closure of IA. DESCRIPTION
The dat_ia_close() function closes an IA (destroys an instance of the Interface Adapter). The ia_flags specify whether the Consumer wants abrupt or graceful close. The abrupt close does a phased, cascading destroy. All DAT Objects associated with an IA instance are destroyed. These include all the con- nection oriented Objects: public and reserved Service Points; Endpoints, Connection Requests, LMRs (including lmr_contexts), RMRs (includ- ing rmr_contexts), Event Dispatchers, CNOs, and Protection Zones. All the waiters on all CNOs, including the OS Wait Proxy Agents, are unblocked with the DAT_HANDLE_NULL handle returns for an unblocking EVD. All direct waiters on all EVDs are also unblocked and return with DAT_ABORT. The graceful close does a destroy only if the Consumer has done a cleanup of all DAT objects created by the Consumer with the exception of the asynchronous EVD. Otherwise, the operation does not destroy the IA instance and returns the DAT_INVALID_STATE. If async EVD was created as part of the of dat_ia_open(3DAT), dat_ia_close() must destroy it. If async_evd_handle was passed in by the Con- sumer at dat_ia_open(), this handle is not destroyed. This is applicable to both abrupt and graceful ia_flags values. Because the Consumer did not create async EVD explicitly, the Consumer does not need to destroy it for graceful close to succeed. RETURN VALUES
DAT_SUCCESS The operation was successful. DAT_INSUFFICIENT_RESOURCES The operation failed due to resource limitations. This is a catastrophic error. DAT_INVALID_HANDLE Invalid DAT handle; ia_handle is invalid. DAT_INVALID_PARAMETER Invalid parameter; ia_flags is invalid. DAT_INVALID_STATE Parameter in an invalid state. IA instance has Consumer-created objects associated with it. USAGE
The dat_ia_close() function is the root cleanup method for the Provider, and, thus, all Objects. Consumers are advised to explicitly destroy all Objects they created prior to closing the IA instance, but can use this function to clean up everything associated with an open instance of IA. This allows the Consumer to clean up in case of errors. Note that an abrupt close implies destruction of EVDs and CNOs. Just as with explicit destruction of an EVD or CNO, the Consumer should take care to avoid a race condition where a Consumer ends up attempting to wait on an EVD or CNO that has just been deleted. The techniques described in dat_cno_free(3DAT) and dat_evd_free(3DAT) can be used for these purposes. If the Consumer desires to shut down the IA as quickly as possible, the Consumer can call dat_ia_close(abrupt) without unblocking CNO and EVD waiters in an orderly fashion. There is a slight chance that an invalidated DAT handle will cause a memory fault for a waiter. But this might be an acceptable behavior, especially if the Consumer is shutting down the process. No provision is made for blocking on event completion or pulling events from queues. This is the general cleanup and last resort method for Consumer recovery. An implementation must provide for successful completion under all conditions, avoiding hidden resource leakage (dangling memory, zombie processes, and so on) eventually leading to a reboot of the oper- ating system. The dat_ia_close() function deletes all Objects that were created using the IA handle. The dat_ia_close() function can decrement a reference count for the Provider Library that is incremented by dat_ia_open() to ensure that the Provider Library cannot be removed when it is in use by a DAT Consumer. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard: uDAPL, 1.1, 1.2 | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
dat_cno_free(3DAT), dat_evd_free(3DAT), dat_ia_open(3DAT), libdat(3LIB), attributes(5) SunOS 5.10 16 Jul 2004 dat_ia_close(3DAT)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy