Sponsored Content
Top Forums Shell Programming and Scripting IF loop to check the time modified Post 302781255 by mahesh300182 on Friday 15th of March 2013 07:56:54 PM
Old 03-15-2013
IF loop to check the time modified

Hi Frnds,

i have a folder test in which files generated daily how to chek the files that are modified on that day as a condition for ex,

Code:
if [ file is modified today ]
then echo "i have got something to do with the file"
else
echo" sorry"
fi

i will have more than 3 to 4 files that are modified today. and if they are modified i have some process to do with that. Please help me

Last edited by mahesh300182; 03-15-2013 at 08:58 PM.. Reason: code tag not used properly
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Modified time

How do you change the modified time of a file on UNIX?? (4 Replies)
Discussion started by: frank
4 Replies

2. Shell Programming and Scripting

Check if file modified

Hi, I have a monitoring script that I run, and I would like to automate checking if specific parameter file is modified during the last day or two. How do I do that? (1 Reply)
Discussion started by: nimo
1 Replies

3. Shell Programming and Scripting

getting last accessed and modified time together

actually, i'm making an Intrusion Detection System for education purpose (for project) using Bourne shell. The problem I get in that is:- 1. My application should check if there's some modification or alteration in the directory. 2, For that thing, I need to have every attribute of file and... (1 Reply)
Discussion started by: raku05
1 Replies

4. Shell Programming and Scripting

Finding out the last modified time for files

I need to find out the last modified time for the files which are older than 6 months. If I use ls -l, the files which are older than 6 months, I am just getting the day, month and year instead of exact time. I am using Korn shell, and SUN OS. Thanks in Advance, Kiran (3 Replies)
Discussion started by: kumariak
3 Replies

5. Shell Programming and Scripting

changing modified time

How to change the modified time of a file to any specified time. ls -ltr drwxr-xr-x 2 pipe pipe 4096 Jun 10 10:33 coredump_06062008 ---------------------------------------------------------------------- here file coredump_06062008 last modified time is Jun 10 10:33 and i... (1 Reply)
Discussion started by: ali560045
1 Replies

6. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

7. Shell Programming and Scripting

Grep for modified time

is it possible to come up with a list of files that are modified before a certain number of hours only using the grep command? ex. list files that were modified less than 10 hours ago i've only managed to list files that were created on the same day, i can't seem to figure out how to work... (3 Replies)
Discussion started by: momo.reina
3 Replies

8. Homework & Coursework Questions

Grep for modified time

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: is it possible to come up with a list of files that are modified before a certain number of hours only using the... (3 Replies)
Discussion started by: momo.reina
3 Replies

9. Shell Programming and Scripting

How to check when cron is modified

Hi all, We use cron "/usr/rdl/sc/cccron" to execute our jobs. But sometimes it is being changed. but we are not sure when it is changed. how could we find when cron is modified. i checked cron by giving ls -l . but it is showing 2009 year. ls -l /usr/rdl/sc/cccron -r-xr-xr-x 1... (0 Replies)
Discussion started by: Divakar
0 Replies

10. UNIX for Dummies Questions & Answers

How to check when cron was modified

Hi all, We use cron "/usr/rdl/sc/cccron" to execute our jobs. But sometimes it is being changed. but we are not sure when it is changed. how could we find when cron is modified. i checked cron by giving ls -l . but it is showing 2009 year. ls -l /usr/rdl/sc/cccron -r-xr-xr-x 1... (2 Replies)
Discussion started by: Divakar
2 Replies
TARDIFF(1)							   User Commands							TARDIFF(1)

NAME
TarDiff - Compare two tarballs and report differences DESCRIPTION
TarDiff compares the contents of two tarballs and reports on any differences found between them. Its use is mainly for release managers who can use it as a QA tool to make sure no files have accidently been left over or were added by mistake. TarDiff supports compressed tar- balls, diff statistics and suppression of GNU autotool changes. SYNOPSIS
tardiff [options] file1.tar file2.tar[.gz/.bz2] OPTIONS
-m, --modified Report on all changed files, including those present in both tarballs -l, --list List all files, even those not changed at all -a, --autoskip Skip files which belong to the GNU autotools (for --modified) -s, --stats Run statistics (diffstat) on all modified files (for --modified) -v, --version Display tardiff version -h, --help Display this help screen SEE ALSO
tar(1), tardy(1) AUTHOR
TarDiff was written by Josef Spillner <josef@coolprojects.org>. This man page was written by Axel Beckert <abe@debian.org> based on help2man(1) output for the Debian Project, but may be used by others. COPYRIGHT
Copyright (C) 2005 Josef Spillner <josef@coolprojects.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. TarDiff 0.1 December 2011 TARDIFF(1)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy