In my home directory (msc-loader) there are some files like this:
Code:
[root@msc-loader /]# ls -l
-rwxrwxrwx 1 user dba 1680318 Jan 20 13:32 103386_s.c
-rwxrwxrwx 1 user dba 256743 Jan 20 13:37 103387_o.c
-rwxrwxrwx 1 user dba 1635363 Jan 20 13:39 103387_s.c
-rwxrwxrwx 1 user dba 264735 Jan 20 13:41 103388_o.c
-rwxrwxrwx 1 user dba 1613385 Jan 20 14:38 103388_s.c
-rwxrwxrwx 1 user dba 283716 Jan 20 14:41 103389_o.c
-rwxrwxrwx 1 user dba 1528470 Jan 20 14:55 103389_s.c
-rwxrwxrwx 1 user dba 257742 Jan 20 15:39 103390_o.c
-rwxrwxrwx 1 user dba 1614384 Jan 20 15:41 103390_s.c
-rwxrwxrwx 1 user dba 257742 Jan 20 15:42 103391_o.c
-rwxrwxrwx 1 user dba 1673325 Jan 20 15:44 103391_s.c
-rwxrwxrwx 1 user dba 1680318 Jan 20 16:32 103386_s.c
-rwxrwxrwx 1 user dba 256743 Jan 20 16:37 103387_o.c
-rwxrwxrwx 1 user dba 1635363 Jan 20 16:39 103387_s.c
-rwxrwxrwx 1 user dba 264735 Jan 20 17:41 103388_o.c
-rwxrwxrwx 1 user dba 1613385 Jan 20 17:38 103388_s.c
-rwxrwxrwx 1 user dba 283716 Jan 20 17:41 103389_o.c
-rwxrwxrwx 1 user dba 1528470 Jan 20 17:55 103389_s.c
-rwxrwxrwx 1 user dba 257742 Jan 20 17:39 103390_o.c
-rwxrwxrwx 1 user dba 1614384 Jan 20 18:41 103390_s.c
-rwxrwxrwx 1 user dba 257742 Jan 20 18:42 103391_o.c
-rwxrwxrwx 1 user dba 1673325 Jan 20 18:44 103391_s.c
As you see, the files are created between the time [13:32] until [18:44]
ok?
Now, I need to search files that created between [16:37] until [18:42]
This highly depends on your find's version, which you fail to mention. If it happens to be GNU find, the -newerXY test may be available. In other versions, you may need to touch two files with your starting and ending times, respectively, and then compare against those with the -newer test.
Last edited by RudiC; 01-21-2014 at 10:15 AM..
Reason: typo
find /app/data -name "Availability" -
Below is the output now i need to filter based on latest modified timestamp.
I know 3 is the latest modified time stamp but i tried different options but only filtering docs and not on headnote..Can any one tell me how to do that..
... (2 Replies)
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way... (10 Replies)
Hello, I really don't know if this is possible, but I figured the wonderful users of unix.com may be able to provide me with some help/suggestions.
I want to create a (bash) script that would go will accept an input file. That input file contains important information as well as pathnames. For... (4 Replies)
Hi Guys,
I want to search the content of all the files (of a particular type like .txt)
in a directory for a specific string pattern. Can anyone help me?
Thanks (7 Replies)
I need to search for a particular string. This string might be present in many files. The directory in which I am present has more than one subdirectories. Hence, the search should check in all the subdirectories and all the corresponding files and give a list of files which have the particular... (5 Replies)
Hello my friends,
I need to write a simple shell bad file :D that search and delete a file it's name 'Microsoft.txt' in the current directory and its subdirectories?
So can you help to guide me how i can write this shell, Just give me the beginning :o thank you. (1 Reply)
Hi All,
I know the timestamp of a file. Now i would like to list all the files in the with the same time stamp in the same file.
Any help would be appreciated.
Thanks.
sunny (1 Reply)
hi
can i know how to get the file name of any files containing for example "abc" from a number of files in a directory?
i tried "ls -ltrc | grep abc" but no resulted generated.
thanks in advance. (1 Reply)
I wanted to search in all the sub directories under /vob/project (recurse) in everything inside /vob/project.
search.run
for x in `cat search.strings`
do
find /vob/project -type f -print | xargs grep -i $x > ~/$x.txt
done
search.string
hello
whoami
I am getting the error ... (5 Replies)