Sponsored Content
Full Discussion: Date of file
Top Forums UNIX for Dummies Questions & Answers Date of file Post 302761335 by Manueldo on Friday 25th of January 2013 12:51:16 PM
Old 01-25-2013
NEWER...with IF test ...I guess yes.....
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

2. UNIX for Dummies Questions & Answers

Move A File With Same Date,don't Change The Desitination Dir Date

Assume, I created one file three years back and I like to move the file to some other directory with the old date (Creation date)? Is it possible? Explain? (1 Reply)
Discussion started by: jee.ku2
1 Replies

3. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

4. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

5. Shell Programming and Scripting

ksh compare dates INSIDE a file (ie date A is > date B)

In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line. I thought I would... (4 Replies)
Discussion started by: right_coaster
4 Replies

6. Shell Programming and Scripting

finding date numeral from file and check the validity of date format

hi there I have file names in different format as below triss_20111117_fxcb.csv triss_fxcb_20111117.csv xpnl_hypo_reu_miplvdone_11172011.csv xpnl_hypo_reu_miplvdone_11-17-2011.csv xpnl_hypo_reu_miplvdone_20111117.csv xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies

7. Shell Programming and Scripting

Searching for unknown date inside the file and replace to new date

Hello, Iam a newbies to Shell scripting. Iam trying to replace the date inside the file to new date. is there anyway that we can just use the pattern to search as "..." I have many files want to replace with the same date, and each file contains different date. Thanks for your help. ... (2 Replies)
Discussion started by: Daro
2 Replies

8. UNIX for Dummies Questions & Answers

How to pick the latest file with date as one among the file name.( not exactly present date.)?

i have files like 1)20131112_abc_01.csv and 2)20131113_abc_01.csv and 3)20131113_abc_02.csv when i try to fetch the file in the next day. it shud pick the third file.. plz help me.. and i use `date +"%Y%m%d"` command to fetch..it fetches the current date... (2 Replies)
Discussion started by: applepie
2 Replies

9. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

10. UNIX for Beginners Questions & Answers

“sed” replace date in text file with current date

We want to call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below: abc.txt ------------------ Code: line1 line2 line3 $$EDWS_DATE_INSERT=08-27-2019 line4 $$EDWS_PREV_DATE_INSERT=08-26-2019 I am trying to write a... (3 Replies)
Discussion started by: pradeepp
3 Replies
CONVDATE(1)						    InterNetNews Documentation						       CONVDATE(1)

NAME
convdate - Convert to/from RFC 5322 dates and seconds since epoch SYNOPSIS
convdate [-dhl] [-c | -n | -s] [date ...] DESCRIPTION
convdate translates the date/time strings given on the command line, outputting the results one to a line. The input can either be a date in RFC 5322 format (accepting the variations on that format that innd(8) is willing to accept), or the number of seconds since epoch (if -c is given). The output is either ctime(3) results, the number of seconds since epoch, or a Usenet Date: header, depending on the options given. If date is not given, convdate outputs the current date. OPTIONS
-c Each argument is taken to be the number of seconds since epoch (a time_t) rather than a date. -d Output a valid Usenet Date: header instead of the results of ctime(3) for each date given on the command line. This is useful for testing the algorithm used to generate Date: headers for local posts. Normally, the date will be in UTC, but see the -l option. -h Print usage information and exit. -l Only makes sense in combination with -d. If given, Date: headers generated will use the local time zone instead of UTC. -n Rather than outputting the results of ctime(3) or a Date: header, output each date given as the number of seconds since epoch (a time_t). This option doesn't make sense in combination with -d. -s Pass each given date to the RFC 5322 date parser and print the results of ctime(3) (or a Date: header if -d is given). This is the default behavior. EXAMPLES
Most of these examples are taken, with modifications from the original man page dating from 1991 and were run in the EST/EDT time zone. % convdate '10 Feb 1991 10:00:00 -0500' Sun Feb 10 10:00:00 1991 % convdate '13 Dec 91 12:00 EST' '04 May 1990 0:0:0' Fri Dec 13 12:00:00 1991 Fri May 4 00:00:00 1990 % convdate -n '10 feb 1991 10:00' '4 May 90 12:00' 666198000 641880000 % convdate -c 666198000 Sun Feb 10 10:00:00 1991 ctime(3) results are in the local time zone. Compare to: % convdate -dc 666198000 Sun, 10 Feb 1991 15:00:00 +0000 (UTC) % env TZ=PST8PDT convdate -dlc 666198000 Sun, 10 Feb 1991 07:00:00 -0800 (PST) % env TZ=EST5EDT convdate -dlc 666198000 Sun, 10 Feb 1991 10:00:00 -0500 (EST) The system library functions generally use the environment variable TZ to determine (or at least override) the local time zone. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net>, rewritten and updated by Russ Allbery <rra@stanford.edu> for the -d and -l flags. $Id: convdate.pod 8894 2010-01-17 13:04:04Z iulius $ SEE ALSO
active.times(5). INN 2.5.2 2010-02-08 CONVDATE(1)
All times are GMT -4. The time now is 09:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy