Searching executables datewise


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Searching executables datewise
# 1  
Old 09-26-2008
Lightbulb Searching executables datewise

I want to search executable files after a particular time and date ,
i.e.
in a folder if a file has been accessed,modified or changed after a particular date and time ,then that file should be listed , and current date and time should be stored in a file so that when i again run the script ,it will get the last date and time stored in a file and then list the file only if the timestamp of the file is of after the last date and time stored.


Thanks in advance !! Smilie
# 2  
Old 09-26-2008
post your effort..
# 3  
Old 09-26-2008
My efforts

I was trying

find . -type f -mtime 1 -print
# 4  
Old 09-26-2008
try this..
Code:
find . -type f -mtime 1 -ls -long|awk '{print $8" "$9" "$10}' > newfile

# 5  
Old 09-26-2008
not working , I did not get it, Complete descritption

What i actually want that after a particular date-time it will list all the files and that date-time is stored in a file .So every time script will run it will read the date-time from a file to search files modified after that date-time.

Thanks in advance
# 6  
Old 09-26-2008
You want
1. start off by listing files newer than a certain date
2. remember today's date
3. run sometime in the future finding only those files changed after today

assume the certain date in number 1 is Aug 1, 2008
Code:
#!/bin/ksh
if [[ ! -r myremember.date ]] ; then 
# first time -set the file time to aug 1 2008
    touch -t 200808010001 myremember.date 
fi
# find files newer than myremember.date 
find /path/to/file -type f -newer myremember.date 

# set file time on myremember.date to today
touch myremember.date

# 7  
Old 09-26-2008
Thank YOu

thanks a lot !! it works perfectly
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Finding All Pro *C executables

Hi , I want to find all Pro *C executables in a directory say /. When i fire file command on Pro*c file it gives below o/p ELF-64 executable object file - PA-RISC 2.0 (LP64) my system is HP-UX eux012 B.11.23 U 9000/800 151107499 unlimited-user license but when i fire file on a C... (2 Replies)
Discussion started by: Jcpratap
2 Replies

2. Shell Programming and Scripting

Scripting with executables

Hi everyone, I am working with an executable (let's say work) in bash shell. When I run this work executable it asks the following information; 1- choose task a or b 2- input file 3- output file 4- some operational choices after it reads the given input file, does some algebraic... (17 Replies)
Discussion started by: hayreter
17 Replies

3. Shell Programming and Scripting

Help: Makefile with multiple executables

I am trying to create executables for the following files Currently, I am making 9 different directories for for each. I would like to make 1 directory but everytime I try it does not work. CROSS_COMPILE?= # CROSS_COMPILE used to = arm-arago-linux-gnueabi... (1 Reply)
Discussion started by: bpetersen
1 Replies

4. Shell Programming and Scripting

Searching for executables

Hello Unix users, this is my first post here. :) I want to search a directory (and subdirectories) for executable files (files with rwx------ permission) and move them to a different folder. What Unix commands can accomplish this? (2 Replies)
Discussion started by: Sagan_Radiation
2 Replies

5. Solaris

C compiler cannot create executables

Hi, I'm trying to compile Apache2.2 (I know it is available as a package) on a fresh install of Solaris Express 11. I've installed gcc-3 and gnu-bintutils via pkg. The config.log is attached (as config.txt). I don't see what I'm missing. Thanks, Doug (1 Reply)
Discussion started by: Doug_M
1 Replies

6. Programming

Compare two executables

Hi - I have two complex (for me at least) make files. The older one creates a succesful executable. The later one uses if statements to conditionally make different versions of the executable. The 2nd produces an executable that fails. I have "eyeballed" the differences in the Make files and run... (18 Replies)
Discussion started by: BrighterLater
18 Replies

7. Programming

Error creating executables

hi, I am getting error when trying to create binaaries for Xerces C++ error is configure:error:installation:cofihuration error:compiler cant create executables ??????????? Thanks in advance im using AIX flavour of IBM Im using ./configure command to create binaries.Its saying c... (6 Replies)
Discussion started by: chetan2309
6 Replies

8. Programming

executables ending with *

Hi All, I m very new to unix. I have a basic doubt .. In unix I m seeing that there is a * at the end of by executable name (exe1*).. Wht is the significance of that Thanks a lot in advance (2 Replies)
Discussion started by: binums
2 Replies

9. UNIX for Dummies Questions & Answers

Tag Release no. to Executables

Hello, I want to give and Release and Version no. in my .so and .exe. I am using Solaris 8 Can i do this by having the value in a variable and then tagging it via a makefile. Or any other way. Any help is appreciated. Thanks in advance (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies

10. UNIX for Dummies Questions & Answers

cannot create executables

I am trying to install PROFTPD-1.2.7 on a SCO OpenServer 5.0.6 Server with a gcc-2.95.2 installed the VOLS files from http://www.caldera.com/skunkware. The problem I am having is when I try to run ./configure in the proftpd directory I get this error: # ./configure checking build system... (6 Replies)
Discussion started by: stufine
6 Replies
Login or Register to Ask a Question