Sponsored Content
Top Forums UNIX for Advanced & Expert Users Need to search for keywords within files modified at a certain time Post 302693769 by virtual123 on Wednesday 29th of August 2012 05:05:59 PM
Old 08-29-2012
i just tried substituting echo for grep and it lists a whole bunch of files. here is the command I used and the results. I am trying to search for the keyword 023758874 in the files. It just lists around 80 files and none of these files have this searched keyword.
Code:
$ touch -t 201208271230 /home/n0149941/dummy1 ;touch -t 201208271240 /home/n0149941/dummy2; find .   \( -newer /home/n0149941/dummy1 -a ! -newer /home/n0149941/dummy2 \)  -exec echo -l "023758874" {} \;
-l 023758874 ./4imlaep9tu9.data.dat
-l 023758874 ./4imlaep9bbu.data.dat
-l 023758874 ./4imlbcc7evw.data.dat
-l 023758874 ./4imlbwaupvi.data.dat
-l 023758874 ./4imlc67k4x7.data.dat
-l 023758874 ./4imlc7nzmxy.data.dat
-l 023758874 ./4imlcse2k81.data.dat
-l 023758874 ./4imld2t4edz.data.dat
-l 023758874 ./4imldlk3ni5.data.dat
-l 023758874 ./4imldvyzd93.data.dat
-l 023758874 ./4imldxm1njw.data.dat
-l 023758874 ./4imldzj4098.data.dat
-l 023758874 ./4imle0xg69h.data.dat
-l 023758874 ./4imle3ri5oy.data.dat
-l 023758874 ./4imle52y8e7.data.dat
-l 023758874 ./4imlefi9ljc.data.dat
-l 023758874 ./4imlegdr9ct.data.dat
-l 023758874 ./4imlejmedy4.data.dat
-l 023758874 ./4imlelcv1lw.data.dat
-l 023758874 ./4imleon11cm.data.dat
-l 023758874 ./4imlep5jz1s.data.dat
-l 023758874 ./4imleq359pa.data.dat
-l 023758874 ./4imlery8e5i.data.dat
-l 023758874 ./4imlezyoz5x.data.dat
-l 023758874 ./4imlf1kbu9p.data.dat
-l 023758874 ./4imlf2ygsi5.data.dat
-l 023758874 ./4imlf3e6sg3.data.dat
-l 023758874 ./4imlf52g38z.data.dat
-l 023758874 ./4imlf7a2871.data.dat
-l 023758874 ./4imlf9xyi7b.data.dat
-l 023758874 ./4imlfaf3vv9.data.dat
-l 023758874 ./4imlfffuyny.data.dat
-l 023758874 ./4imlfh3ifd1.data.dat
-l 023758874 ./4imlfidx12c.data.dat
-l 023758874 ./4imlfmiv2e2.data.dat
-l 023758874 ./4imlfoooizd.data.dat
-l 023758874 ./4imlfslme1z.data.dat
-l 023758874 ./4imlfuvu2j7.data.dat
-l 023758874 ./4imlfwogsp6.data.dat
-l 023758874 ./4imlfxyxnx4.data.dat
-l 023758874 ./4imlfz91pc7.data.dat
-l 023758874 ./4imlg19ioyt.data.dat
-l 023758874 ./4imlg6zw38r.data.dat
-l 023758874 ./4imlg898g8c.data.dat
-l 023758874 ./4imlga3fklg.data.dat
-l 023758874 ./4imlgfp3trs.data.dat-


Last edited by methyl; 08-29-2012 at 08:02 PM.. Reason: please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Checking modified time of files

My problem is with the find command. After looking through the forum I've got - find . -mtime 2 -name "*" which gives me a list of all the files modified in the last 2 days. How do I change this to list files modified in the last 2 hours? Sorry if this question is already on the forum... (4 Replies)
Discussion started by: am97395331
4 Replies

2. 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

3. Solaris

Finding list of modified files for a particular time duration

Hi , I am trying to find out the List of files modified or added aftter installation of any component on SUN solaris box . But i am not able to do it using ls or find command . Can somebody help me out ? Thanks Sanjay Gupta (2 Replies)
Discussion started by: sanajyg_mnit
2 Replies

4. Shell Programming and Scripting

Unzip files where modified time>05:00 ?

Hello :D I am on the shell prompt in a directory, with couple of zip files in it. How can I unzip '*.zip' where modified time > 05:00 ...please help Regards SunnyK (3 Replies)
Discussion started by: SunnyK
3 Replies

5. UNIX for Dummies Questions & Answers

deleting files based on file name and modified time

Hi, I have some log files created in the following fashion Ex: file name modified date 1) s.log1 01-jan-08 2) s.log2 02-jan-08 3) s.log3 03-jan-08 4) s.log4 04-jan-08 Now I want to have the latest 2 logs and delete the others. Can you tell me the one liner /... (1 Reply)
Discussion started by: ammu
1 Replies

6. UNIX for Advanced & Expert Users

Find and store files based on FileName and Modified Time

Hi, I am currently using the following command: files=(ls enuCPU??.????.exp ntuCPU??.????.exp) I need to now change the commmand to store the file names of files that have been modified before datetime equal to say '02/16/2008 20:30:00' What could I use? (2 Replies)
Discussion started by: edisonantus
2 Replies

7. Shell Programming and Scripting

Search a file with keywords

Hi All I have a file of format asdf asf first sec endi asdk rt 123 ferf dfg ijglkp (7 Replies)
Discussion started by: mailabdulbari
7 Replies

8. Emergency UNIX and Linux Support

Is there any way to set the files modified date and stamp to last modifies time?

Actually i did modification in a file on server by mistake, now its showing current time stamp, is there any way to set the files modified date and stamp to last modifies time. Please advice here.Thanks in advance.:b: (7 Replies)
Discussion started by: saluja.deepak
7 Replies

9. Shell Programming and Scripting

Perl - use search keywords from array and search a file and print 3rd field when matched

Hi , I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code. my $current_value=12345; my @users=("bob","ben","tom","harry"); open DBLIST,"<","/var/tmp/DBinfo"; my @input = <DBLIST>; foreach (@users) { my... (11 Replies)
Discussion started by: chidori
11 Replies

10. Shell Programming and Scripting

Search files in directory for keywords using bash

I have ~100 text files in a directory that I am trying to parse and output to a new file. I am looking for the words chr,start,stop,ref,alt in each of the files. Those fields should appear somewhere in those files. The first two fields of each new set of rows is also printed. Since this is on a... (7 Replies)
Discussion started by: cmccabe
7 Replies
UNKNOWN(1)						      General Commands Manual							UNKNOWN(1)

NAME
unknown - identify possible genotypes for unknowns SYNOPSIS
A program to rapidly identify which genotypes are possible for individuals typed as unknowns in the input pedigree. unknown [ -cl ] DESCRIPTION
unknown infers possible genotypes and mating combinations for parents with unknown genotypes for ilink(1), mlink(1) and linkmap(1). OPTIONS
-c Use conditional allele frequencies. -l Choose a good set of loop breakers automatically. RETURN VALUE
0 Successful completion ERRORS
10 File not found 255 Failure EXAMPLES
Normally, unknown(1) is run immediately prior to its sister programs, ilink(1), mlink(1) and linkmap(1), like this: unknown mlink FILES
unknown(1) reads the two files pedfile.dat and datafile.dat as its own input and produces various temporary files that are used as input to the next program. These temporary files are ipedfile.dat, upedfile.dat, speedfile.dat and newspeedfile.dat. NOTES
unknown(1) is part of the FASTLINK package, which is a re-implementation of the LINKAGE suite of computer tools that help investigate genetic linkage as first proposed G.M. Lathrop, J.M. Lalouel, C. Julier, and J. Ott. AUTHORS
Dylan Cooper, Alejandro Schaffer, and Tony Schurtz based on work originally by Jurg Ott, Ph.D, et. al. This manual page was written by Elizabeth Barham <lizzy@soggytrousers.net> for the Debian GNU/Linux system (but may be used by others). WORD-WIDE-WEB http://www.ncbi.nlm.nih.gov/CBBResearch/Schaffer/fastlink.html SEE ALSO
ilink(1), linkmap(1), lodscore(1), mlink(1). April 15, 2003 UNKNOWN(1)
All times are GMT -4. The time now is 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy