How to get year part from file created date?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to get year part from file created date?
# 8  
Old 01-15-2014
Quote:
Originally Posted by Yoda
Use -E option:
Code:
-E           The same as -l, except  displays  time  to  the
             nanosecond  and  with  one format for all files
             regardless  of age: yyyy-mm-dd hh:mm:ss.nnnnnnnnn (ISO 8601:2000 format).

Thanks, this works perfectly
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Delete all files created in specific year

I have more than 200K files created in year 2017 under directory having size of 50GB. I want to all these files in one shot. Is there any faster option available with find command to delete all these file ? (6 Replies)
Discussion started by: sp23029
6 Replies

2. Shell Programming and Scripting

Find the file created on current date

Hi All, I'm trying to find a file which is created on current day.... I searched in unix.com and i found, below command. find /land/ -mtime -1 -type f -print | grep "FF_Member_STG.dat" The command checks if the file with name "FF_Member_STG.dat" is created today then exit else proceed. ... (3 Replies)
Discussion started by: ace_friends22
3 Replies

3. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

4. UNIX for Dummies Questions & Answers

Can we change the file created date?

Hi, I am creating a file in unix today. Is it possible to make the file created as 2 days older (or some past date)? P.S: i dont want to change the system date to older one and try.:rolleyes: Thanks, Pandeeswaran (6 Replies)
Discussion started by: pandeesh
6 Replies

5. Shell Programming and Scripting

Rename File Based on Created Date

I am trying to rename files based on the created/born date of the file. I Have a total of 4000 files that i am trying to do this with and would like it to be log_yyyymmddhh.gz right now the files are maillog.???.gz. Can anyone point me in the right direction of how to get this done via scipt? ... (4 Replies)
Discussion started by: Paulb
4 Replies

6. Shell Programming and Scripting

File created year

Hi I need to get the File creation date (MM,DD,YYYY) using ls -ltr am getting only Month and Day only, I need year also when the file is modified. Thanks (3 Replies)
Discussion started by: KiranKumarKarre
3 Replies

7. UNIX for Dummies Questions & Answers

Finding the date a file was created

how do i find the date a file was created? (3 Replies)
Discussion started by: trob
3 Replies

8. UNIX for Dummies Questions & Answers

Create Year directory, date subdirectory and archive the file

Hi, After checking all the UNIX threads, I am able to come up with a solution so far. I am working on a shell script where it moves the files to a certain directory. The conditions to check are 1) Check if the file exists in the current directory. 2) Check if the destination directory... (2 Replies)
Discussion started by: madhunk
2 Replies

9. Shell Programming and Scripting

Need to find created date of file in UNIX

I need to write a script which has to list all the files which are created before six months from now. kindly help on this ... (7 Replies)
Discussion started by: amirthraj_12
7 Replies

10. UNIX for Dummies Questions & Answers

File management based on date created

Hi There, I was wondering how to manage files (ie. rm, cp , mv) based on date last modified and date created. ie. Say i want to: mv ./* ./temp/* (where the date created < 29/1/2006 ) or mv ./* ./temp/* (where the date modified > 27/1/2006 && date modified < 29/1/2006) Thanks in... (1 Reply)
Discussion started by: Geehog_Rare
1 Replies
Login or Register to Ask a Question
hdate_struct(3) 						libhdate C language						   hdate_struct(3)

NAME
hdate_struct - libhdate Hebrew date struct SYNOPSIS
#include <hdate.h> Data Fields int hd_day int hd_mon int hd_year int gd_day int gd_mon int gd_year int hd_dw int hd_size_of_year int hd_new_year_dw int hd_year_type int hd_jd int hd_days int hd_weeks Detailed Description libhdate Hebrew date struct Field Documentation int hdate_struct::hd_day The number of day in the hebrew month (1..31). int hdate_struct::hd_mon The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2). int hdate_struct::hd_year The number of the hebrew year. int hdate_struct::gd_day The number of the day in the month. (1..31) int hdate_struct::gd_mon The number of the month 1..12 (1 - jan). int hdate_struct::gd_year The number of the year. int hdate_struct::hd_dw The day of the week 1..7 (1 - sunday). int hdate_struct::hd_size_of_year The length of the year in days. int hdate_struct::hd_new_year_dw The week day of Hebrew new year. int hdate_struct::hd_year_type The number type of year. int hdate_struct::hd_jd The Julian day number int hdate_struct::hd_days The number of days passed since 1 tishrey int hdate_struct::hd_weeks The number of weeks passed since 1 tishrey Author Generated automatically by Doxygen for libhdate C language from the source code. Version 1.4 Sun Jan 8 2012 hdate_struct(3)