Sponsored Content
Top Forums UNIX for Dummies Questions & Answers command for modification date of a file Post 93657 by scampsd on Wednesday 21st of December 2005 05:10:06 AM
Old 12-21-2005
Question command for modification date of a file

Good morning,
I would like to find all files of a certain type and display their name as well as their modification date.
In order to do this, I would do the following:

find ./ -name *.csv | ????????

My question: what to put after the pipe instead of the question marks? Is there a basic UNIX command that can determine the modification date of a file?

Thanks
Dominique
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script: last modification date for a file

Hi i have a ques in Shell scripting: ques: accept a filename as a command line argument. Validate the input and display the last modification date for that file. Help pls. (4 Replies)
Discussion started by: onlyc
4 Replies

2. Shell Programming and Scripting

List the file or files with last modification date

hi. I need help my programing friends :p I need to list all the files with a certain name (for example FileName) by last modification date but only the one with the last date. If there are two files with the same name and same modification date it should print the both. For example in this set... (6 Replies)
Discussion started by: KitFisto
6 Replies

3. Homework & Coursework Questions

How do I get at the modification date for a file as a variable for a script?

I realize this is basic and probably obvious, but I'm pulling my hair out. I'm guessing this is just some flag on the file command or somesuch, but I can't find it. Help me get unstuck please? EDIT: I guess what I'm asking is once I've got the ls -l output for a file, what command do I use to... (3 Replies)
Discussion started by: Timespike
3 Replies

4. OS X (Apple)

get file modification date in number format (yyyy mm dd hh mm ss)

How do i get the file modification date in number format (yyyy mm dd hh mm ss) i used ls -l pathname but month is still in text "Aug" and year and time is not allways shown. time is show if it is in this year. and year is shown if it is before this year. what do i need to get... (7 Replies)
Discussion started by: rvdokkum
7 Replies

5. Solaris

Command for checking modification history on file

What is the command for checking modification history on file? ---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ---------- Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Discussion started by: jastanle84
6 Replies

6. UNIX for Dummies Questions & Answers

How do you get the last modification date of a file?

I'm trying to get the date output to be in the form yyyy-mm-dd (e.g. 2013-01-18) !/bin/sh modDate=$(stat -c %y $1) echo $modDate >> $1 When I run this on another file (by typing ./dateScript theFile.txt), I keep getting this message: stat: illegal option -- c What's wrong with my code... (2 Replies)
Discussion started by: Nate18
2 Replies

7. Shell Programming and Scripting

Date Modification

Hello all ! I have a piece of code that generates the date of one day ago: /usr/bin/gdate --date='1 day ago' | awk '{print $2 " " $3}' Nov 3 I want the output to be in the form : Nov 03 What other operation should I do for that ? Help (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

8. Programming

File date/time modification and permissions

First, oh great Unix gurus, forgive if this is a stupid question. Unix/Linux is not my main thing but I have been programming in C/C++ for many years. I will do my best to be specific. I have a program in C/C++ that needs to modify the time of a given file. Currently I do this using utime()... (5 Replies)
Discussion started by: Pug
5 Replies

9. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies

10. Shell Programming and Scripting

Subtract a file's modification date with current date

SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise Hi, In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file. How do I achieve this? Regards, Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
GETLASTMOD(3)								 1							     GETLASTMOD(3)

getlastmod - Gets time of last page modification

SYNOPSIS
int getlastmod (void ) DESCRIPTION
Gets the time of the last modification of the main script of execution. If you're interested in getting the last modification time of a different file, consider using filemtime(3). RETURN VALUES
Returns the time of the last modification of the current page. The value returned is a Unix timestamp, suitable for feeding to date(3). Returns FALSE on error. EXAMPLES
Example #1 getlastmod(3) example <?php // outputs e.g. 'Last modified: March 04 1998 20:43:59.' echo "Last modified: " . date ("F d Y H:i:s.", getlastmod()); ?> SEE ALSO
date(3), getmyuid(3), getmygid(3), get_current_user(3), getmyinode(3), getmypid(3), filemtime(3). PHP Documentation Group GETLASTMOD(3)
All times are GMT -4. The time now is 06:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy