Sponsored Content
Full Discussion: Find files newer than...
Top Forums UNIX for Dummies Questions & Answers Find files newer than... Post 85056 by dangral on Friday 30th of September 2005 02:34:51 PM
Old 09-30-2005
you can touch a file with a specific date and then use that file in conjunction with the -newer parameter of find.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with find ! -newer

Hi, I would like to find if a file called test.log is older than 10 min. So i wrote : #!/usr/bin/ksh FICLOG="/home/uuu/result_test.log" FIC="/home/uuu/test.log" touch -t `perl -e 'use POSIX qw(strftime); printf("%s\n",strftime("%m%d%H%M",localtime(time-3600*0.17)));'`... (3 Replies)
Discussion started by: dbfree
3 Replies

2. Solaris

To copy the files newer than specific date

Dear all, Can you help me in copying files newer than speciifc date Thanks in advance, Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies

3. UNIX for Advanced & Expert Users

find -cmin or fin -newer

I am running SUSE/8 and SUSE/9 on a high end server (4 CPU, 8G RAM etc) I have a huge directory structure with over 4million files in it. I have find the files that are modified (created, modified, renamed etc etc) in the last 10 minutes periodically. I have tried "find -cmin -10" and "find... (2 Replies)
Discussion started by: xxxyyyy
2 Replies

4. Shell Programming and Scripting

Copy newer files without create

I want the same effect as "cp -u" but without create missing files, it is possible ? ps: bash (2 Replies)
Discussion started by: mrxrsd
2 Replies

5. Shell Programming and Scripting

Problems with find's -newer Flag

I am writing a script that looks in a reports directory, copies a specified script to a working folder, copies some data files into the working folder, runs the report, zips the new files, then uploads them. Right now to determine what files to zip (as I don't know how many report files there... (6 Replies)
Discussion started by: droppedonjapan
6 Replies

6. Shell Programming and Scripting

How to script to find the newer date in a text file?

Hi, I have a text file, foo.txt, it looks something like below. In the file there is a line that gives the date in the form of: Mon Jun 15 11:09:31 2008. I need to find which date is the newest and then store certain details of that list data to another file. So, in this sample text file, I... (6 Replies)
Discussion started by: boolean2222
6 Replies

7. Shell Programming and Scripting

how to find a file then overwrite with a newer version

This should be a simple script, but can't find one with google search. I just need to find the file that is in many directories, then overwrite that file with a newer version i.e. find file.jar then overwrite with /root/file.jar All I get in searches is substitute text with new test inside... (1 Reply)
Discussion started by: haircat
1 Replies

8. UNIX for Dummies Questions & Answers

Find files newer than x days

We had an arrant rsync run and started copying over new files from one system to another. Although this is what we will want to do at some point, for now, we want to maintain the system as it was a few days ago. I am looking for a script that will find files that are newer than x days. ... (5 Replies)
Discussion started by: Leyva62
5 Replies

9. Shell Programming and Scripting

ls files newer than 6 hours

How do I list al files in a folder with a creation date/time newer than 6 hours? (2 Replies)
Discussion started by: locoroco
2 Replies

10. Shell Programming and Scripting

find command not searching path when -newer specified

When this command is issued from a directory other than where the file is located it works fine: find /db2/D01/log_archive/ -name "S0002166.LOG" -type f /db2/D01/log_archive/db2d01/D01/NODE0000/C0000000/S0002166.LOG When I change -name to -newer, it doesn't work. Find only searches the current... (5 Replies)
Discussion started by: fletchdb2
5 Replies
TOUCH(1)							   User Commands							  TOUCH(1)

NAME
touch - change file timestamps SYNOPSIS
touch [OPTION]... FILE... DESCRIPTION
Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty. A FILE argument string of - is handled specially and causes touch to change the times of the file associated with standard output. Mandatory arguments to long options are mandatory for short options too. -a change only the access time -c, --no-create do not create any files -d, --date=STRING parse STRING and use it instead of current time -f (ignored) -m change only the modification time -r, --reference=FILE use this file's times instead of current time -t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time --time=WORD change the specified time: WORD is access, atime, or use: equivalent to -a WORD is modify or mtime: equivalent to -m --help display this help and exit --version output version information and exit Note that the -d and -t options accept different time-date formats. DATE STRING
The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, rela- tive date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily docu- mented here but is fully described in the info documentation. AUTHOR
Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith. REPORTING BUGS
Report touch bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for touch is maintained as a Texinfo manual. If the info and touch programs are properly installed at your site, the command info coreutils 'touch invocation' should give you access to the complete manual. GNU coreutils 7.1 July 2010 TOUCH(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy