Sponsored Content
Top Forums Shell Programming and Scripting Calculate Files Created Today Post 302357397 by jim mcnamara on Tuesday 29th of September 2009 04:32:43 PM
Old 09-29-2009
Code:
touch -t 200909280200  dummy1
touch -t 200909290200  dummy2
find ./dir1  \( -newer dummy1 -a ! -newer dummy2 \)  -name '*sat'  | wc -l |read dir1cnt
find ./dir2  \( -newer dummy1 -a ! -newer dummy2 \)  -name '*sat'  | wc -l |read dir2cnt
echo "dir1cnt = $dir1cnt dir2cnt = $dir2cnt"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sort files by date, not showing files from today

Hi all, i'm new here in this forum. I really like the helpful answers in this forum. Here a short question. For a script i have to sort files by date and exclude the files of the actual date. Sorting the files by date and preparing the output for awk is done by this line: ls -l... (3 Replies)
Discussion started by: carlosdivega
3 Replies

2. UNIX for Dummies Questions & Answers

To list all the files created today with directory path

Hi, Can any one tell the command to list all the files that are created as of today from all the directories? The Command "ls -ltR" is listing all the files. But I want the list of files that has been created as of today along with the directory path:) Thank you in advance.:) Regards,... (4 Replies)
Discussion started by: meetusha.b
4 Replies

3. Shell Programming and Scripting

Files with 0 file size and created today

hi, I am building a script to identify those files created/modified today and with file size 0. I am able to find the files with 0 file size and created/modified in last 24 hrs as shown below but not today (current date), I tried using (touch -t time filenm) but in my version of unix at work it... (7 Replies)
Discussion started by: rushs682
7 Replies

4. Shell Programming and Scripting

Calculate 30/31 days from today date script

Hi Guys, I was working some time ago n was in need to calculate date 30/31 days from today including Feb (Leap yr stuff). Today date is variable depending on day of execution of script. I tried searching but was not able to get exactly what I needed....So at that I time I implemented by my own... (3 Replies)
Discussion started by: coolgoose85
3 Replies

5. Shell Programming and Scripting

ftp - How to download files which created today?

Hello experts, I have written following script to download files which created today. Unfortunately, it's not working. test.ksh: #Defining variables USR='xxx' PASSWD='yyyy' HT='test.test.com' FILE='S*.pdf' XFILE=$(echo find . -type f -mtime 0) ZFILE=$(echo ls -tR|grep 'Jun 8')... (14 Replies)
Discussion started by: dipeshvshah
14 Replies

6. Shell Programming and Scripting

check file exists and created today issue

Morning My other issue I have seems very simple but im just not seeing it. I have a script that checks on a remote share to see if the backups for some systems have run. Its as simple as: find /mnt/ukwcs-net-config/WLAN-Controllers/ -mtime -1 -ls | egrep '(cfg)' > wlanlog.txt cut -c 1-92... (4 Replies)
Discussion started by: ltodd2
4 Replies

7. Shell Programming and Scripting

How to find files created today in a particular directory?

Dear All, I want a Hp Ux command to find out the files created today in a particular directory or mountpoint. Kindly help. Thanks Bhaskar (10 Replies)
Discussion started by: sudiptabhaskar
10 Replies

8. Linux

List all files created today exclude last one

Hi, ALL thanks in advance, i listed all files using this command ls -ltr $(date +%Y%m%d)*.xmlbut i would like to exclude the last one created ; Best regard MEROUAN Use code tags, thanks. (4 Replies)
Discussion started by: merouan
4 Replies

9. Shell Programming and Scripting

Move all files except sys date (today) files in Solaris 10

I want to move all files from one directory to another directory excluding today (sysdate files) on daily basis. file name is in pattern file_2013031801, file_2013031802 etc (2 Replies)
Discussion started by: khattak
2 Replies

10. Shell Programming and Scripting

Search files with today date and files come anytime in between 10 pm to 1 am

Hi, i want to make script. In a directory everyday( exclude sat and sun) in between 10 pm to 1 am there are 2 files comes and when file comes it will mail us. Format for files is mentioned below. please help me on making this, and also have year end consider and if files come after 12 am it... (6 Replies)
Discussion started by: pallvi_mahajan
6 Replies
whereis(1)						      General Commands Manual							whereis(1)

Name
       whereis - locate source, binary, and or manual for program

Syntax
       whereis [-sbm] [-u] [-SBM dir... -f] name...

Description
       The command locates source/binary and manuals sections for specified files.  The supplied names are first stripped of leading pathname com-
       ponents and any (single) trailing extension of the form ``.ext'', for example,``.c''.  Prefixes of ``s.'' resulting from use of source code
       control are also dealt with.  The command then attempts to locate the desired program in a list of standard places.

Options
       -S dir
	  Search for source files in specified directory.

       -B dir
	  Search for binary files in given directory.

       -M dir
	  Search for manual section files in given directory.

       -b Searches only for binary files.

       -f Terminates last directory list created from use of -S, -B or -M flags and signals the start of file names.

       -m Searches only for manual section files.

       -s Searches only for source files.

       -u Searches for files that do not have one of binary, source or manual section files.  A file is said to be unusual if it does not have one
	  entry of each requested type.  Thus ``whereis -m -u *'' asks for those files in the current directory which have no documentation.

Examples
       The following finds all the files in which are not documented in with source in
       cd /usr/ucb
       whereis -u -M /usr/man/man1 -S /usr/src/cmd -f *

Restrictions
       Since the program uses to run faster, pathnames given with the -M -S and -B must be full.  That is, they must begin with a ``/''.

Files
       /usr/src/*
       /usr/{doc,man}/*
       /lib, /etc, /usr/{lib,bin,ucb,old,new,local}

																	whereis(1)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy