Sponsored Content
Top Forums Shell Programming and Scripting find files from the past 7 days Post 302244178 by photon on Tuesday 7th of October 2008 11:15:03 AM
Old 10-07-2008
I don't see why not.

Code:
$days = 7;
open FILE, "/opt/application/file.txt";
while(my $line = <FILE>){
    if(int(-M $line) < $days){
        #do something
    }
}

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files older than 20 days & not use find

I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in. How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies

2. UNIX for Dummies Questions & Answers

creating a CSV file for past 7 days

I have a requirement which will select the files with a specific naming convention which got created in past 7 days in a specific directory.Lets say the directory is /data/XYZ and the file names follow the below nomenclature like Daily_File*.txt I just need to create one CSV file which will... (12 Replies)
Discussion started by: dr46014
12 Replies

3. Shell Programming and Scripting

How to find a date which is 7 days past when given current date

hii all. I have to get the date of the 7th day past from the current date. if i give the current date as sep 3 then i must get the date as 27th of august. can we get the values from the "cal" command. cal | awk '{print $2}' will this type of command work. actually my need is if today is... (17 Replies)
Discussion started by: ladtony
17 Replies

4. Shell Programming and Scripting

Find last 2 days files.

Need to cpy those files which are created or modified in last 2 days. bash$ ll -lrt total 184 drwxr-xr-x 2 ons dce 256 Oct 12 06:58 files -rw-r--r-- 1 ons dce 4313 Oct 14 06:06 cab.ksh -rw-r--r-- 1 ons dce 6 Oct 14 07:03 Code.txt... (2 Replies)
Discussion started by: saluja.deepak
2 Replies

5. Shell Programming and Scripting

what is the find to command to find the files created last 30 days

what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies

6. Shell Programming and Scripting

Listing files of PAST 7 days and concatenate it...

Hi All, I want to list file of LAST 7 days acc. to its modified date and then concatinate. I have following piece of code.. For concatenate cat file1 file2 >> Output (For concatinating) find . -mtime -7 -exec basename {} \; (list past files but it is including . file also) Plz... (4 Replies)
Discussion started by: vivek1489
4 Replies

7. UNIX and Linux Applications

From past 10 days my one job is taking lots of time

One of my job is taking long running time. I need to identify from the unix log file can you please help how to troubleshoot. (1 Reply)
Discussion started by: Nsharma3006
1 Replies

8. UNIX for Dummies Questions & Answers

Find command to get the modified files past 2 hours

Hello, How to get the modified/created files past 2 hours in Solaris with find command? Thank you. (7 Replies)
Discussion started by: balareddy
7 Replies

9. Shell Programming and Scripting

Should pick latest file within past 3 days using UNIX script and perform steps in message below.

Hi , Can anyone help me how do perform below requirement in unix. Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat) Filenames: 1) abc_20171204_052389.dat 2)abc_20171204_052428.dat DON'T modify... (23 Replies)
Discussion started by: sunnykamal59
23 Replies
TV_GRAB_NO_GFEED(1p)					User Contributed Perl Documentation				      TV_GRAB_NO_GFEED(1p)

NAME
tv_grab_no_gfeed - Grab TV listings for Norway. SYNOPSIS
tv_grab_no_gfeed --help tv_grab_no_gfeed --configure [--config-file FILE] [--gui OPTION] tv_grab_no_gfeed [--config-file FILE] [--days N] [--offset N] [--output FILE] [--quiet] [--debug] tv_grab_no_gfeed --list-channels [--config-file FILE] [--output FILE] [--quiet] [--debug] DESCRIPTION
Output TV and listings in XMLTV format for many stations available in Norway. First you must run tv_grab_no_gfeed --configure to choose which stations you want to receive. Then running tv_grab_no_gfeed with no arguments will get a listings for the stations you chose for five days including today. OPTIONS
--configure Prompt for which stations to download and write the configuration file. --config-file FILE Set the name of the configuration file, the default is ~/.xmltv/tv_grab_no_gfeed.conf. This is the file written by --configure and read when grabbing. --gui OPTION Use this option to enable a graphical interface to be used. OPTION may be 'Tk', or left blank for the best available choice. Additional allowed values of OPTION are 'Term' for normal terminal output (default) and 'TermNoProgressBar' to disable the use of Term::ProgressBar. --output FILE When grabbing, write output to FILE rather than standard output. --days N When grabbing, grab N days rather than 5. --offset N Start grabbing at today + N days. N may be negative. --quiet Suppress the progress-bar normally shown on standard error. --debug Provide more information on progress to stderr to help in debugging. --list-channels Output a list of all channels that data is available for. The list is in xmltv-format. --version Show the version of the grabber. --help Print a help message and exit. ERROR HANDLING
If the grabber fails to download data for some channel on a specific day, it will print an errormessage to STDERR and then continue with the other channels and days. The grabber will exit with a status code of 1 to indicate that the data is incomplete. ENVIRONMENT VARIABLES
The environment variable HOME can be set to change where configuration files are stored. All configuration is stored in $HOME/.xmltv/. On Windows, it might be necessary to set HOME to a path without spaces in it. SUPPORTED CHANNELS
For information on supported channels, see http://data.epg.no/ AUTHOR
Mattias Holmlund, mattias -at- holmlund -dot- se. This documentation and parts of the code copied from tv_grab_uk by Ed Avis, ed -at- membled -dot- com. BUGS
perl v5.14.2 2012-06-30 TV_GRAB_NO_GFEED(1p)
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy