06-25-2012
Hi,
Operating system -linux
Shell -bash
Example: This is the latest file. I need to get the file created date.
here file created date-Jun 25 ,Final output: 20120625
Jun 25 09:10 new_file24062012111590.txt #latest file
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to create a file through a c-shell script which contains only the date and time that the file was created. Does anyone know a simple way to do this?
Thank you,
Paula (7 Replies)
Discussion started by: ccpjr29
7 Replies
2. UNIX for Dummies Questions & Answers
Could someone tell me how to get the date/time (to the second) a file was last modified? I need to know if a file was modified in the last 30 seconds from the system date. I'm on AIX/unix 4.3 (3 Replies)
Discussion started by: alex31
3 Replies
3. Shell Programming and Scripting
Hi,
This is my script:
#! /usr/bin/ksh
cd /app/chdata/workflow/suppl/esoutput/spd/testing
for file in /app/chdata/workflow/suppl/esoutput/spd/testing
do
sort *.txt | awk '{ file=substr($0,1,2)".txt"; print >> file }' ... (3 Replies)
Discussion started by: Sunitha_edi82
3 Replies
4. AIX
I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
Discussion started by: achu
1 Replies
5. AIX
I want to read a log file from a particular location.In the log file each line starts with timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file... (1 Reply)
Discussion started by: achu
1 Replies
6. Shell Programming and Scripting
I want to get maximum/minimum date/timestamp from a data file ?
Sample Input File
=============
rec#,order_dt,ext_ts
1,2010-12-01,2010-12-01 17:55:23.222222
2,2011-11-05,2010-12-01 19:55:23.222222
3,2009-10-01,2010-12-01 18:55:23.222222
for above file
Maximum Order_dt = 2011-11-05... (5 Replies)
Discussion started by: vikanna
5 Replies
7. Shell Programming and Scripting
Hi,
In a field, I should receive the date with time stamp in a particular field. But sometimes the vendor sends just the date or the timestamp or correctl the date×tamp. I have to figure out the the data is a date or time stamp or date×tamp.
If it is date then append "<space>00:00:00"... (1 Reply)
Discussion started by: machomaddy
1 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
Please look into the query
1)Date format: mm/dd/yyyy example (10/22/2013)
2) compare this date with the System date
3) if the difference of dates less than 30 days. Then return true otherwise false.
4)commands date-d is not there in my unix version.
5)present version 6
6)using... (7 Replies)
Discussion started by: RaghavendraT
7 Replies
9. Shell Programming and Scripting
Hello,
I have files that with a naming convention as shown below. Some of the files have dates in the file name and some of them don't have dates in the file name.
imap-hp-import-20150917.txt
imap-dell-gec-import-20150901.txt
imap-cvs-import-20150915.txt
imap-gec-import.txt... (8 Replies)
Discussion started by: Saanvi1
8 Replies
10. UNIX for Advanced & Expert Users
Hi All, Please suggest some file comparison tool in Linux.
The tool have the provision for command line option for file comparison and the output will be stored in to html file. Thanks in advance (2 Replies)
Discussion started by: k_manimuthu
2 Replies
LEARN ABOUT SUSE
pam_timestamp_check
PAM_TIMESTAMP_CHECK(8) Linux-PAM Manual PAM_TIMESTAMP_CHECK(8)
NAME
pam_timestamp_check - Check to see if the default timestamp is valid
SYNOPSIS
pam_timestamp_check [-k] [-d] [target_user]
DESCRIPTION
With no arguments pam_timestamp_check will check to see if the default timestamp is valid, or optionally remove it.
OPTIONS
-k
Instead of checking the validity of a timestamp, remove it. This is analogous to sudo's -k option.
-d
Instead of returning validity using an exit status, loop indefinitely, polling regularly and printing the status on standard output.
target_user
By default pam_timestamp_check checks or removes timestamps generated by pam_timestamp when the user authenticates as herself. When the
user authenticates as a different user, the name of the timestamp file changes to accommodate this. target_user allows to specify this
user name.
RETURN VALUES
0
The timestamp is valid.
2
The binary is not setuid root.
3
Invalid invocation.
4
User is unknown.
5
Permissions error.
6
Invalid controlling tty.
7
Timestamp is not valid.
NOTES
Users can get confused when they are not always asked for passwords when running a given program. Some users reflexively begin typing
information before noticing that it is not being asked for.
EXAMPLES
auth sufficient pam_timestamp.so verbose
auth required pam_unix.so
session required pam_unix.so
session optional pam_timestamp.so
FILES
/var/run/sudo/...
timestamp files and directories
SEE ALSO
pam_timestamp_check(8), pam.conf(5), pam.d(5), pam(8)
AUTHOR
pam_tally was written by Nalin Dahyabhai.
Linux-PAM Manual 04/01/2010 PAM_TIMESTAMP_CHECK(8)