![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find a file named vijay in a directory using find command | amirthraj_12 | UNIX for Dummies Questions & Answers | 6 | 4 Weeks Ago 09:37 AM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 05:12 PM |
| Little bit weired : Find files in UNIX w/o using find or where command | jatin.jain | Shell Programming and Scripting | 10 | 09-19-2007 03:47 AM |
| command find returned bash: /usr/bin/find: Argument list too long | yacsil | Shell Programming and Scripting | 1 | 12-15-2003 03:38 PM |
| how to find a file in UNIX without find command? | bluo | Shell Programming and Scripting | 3 | 09-24-2003 08:47 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
find command
Hi all.,
i am using the follwowing command.. ls -ltr TNT.*.*.*.ctl* | awk -F" " '{print $6" "$7 }' the output is: Feb 27 Feb 27 Feb 27 Feb 27 Feb 28 Feb 28 Mar 9 Mar 21 Mar 21 from this output i am trying to get the FIND the files on march 21. i am using the find command no results. can anyone please give me some suggestions thanks pavi |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Show how you are using the "find" command. Your output cannot be used in the find command since the "Mar 21" string is not stored anywhere in this format.
|
|
#3
|
|||
|
|||
|
Now that I think of it, this is probably what you are attempting to do:
Code:
find . -name TNT.*.*.*.ctl* -exec ls -ltr {} \; | grep "Mar 21"
|
|
#4
|
|||
|
|||
|
find command
Hello.,
i am trying to accomplish is; i have a dir and inside that i have certain files. files keep arriving in that dir. the dir has lot of files but i have to process only those files that arrive today. for eg: today is mar 21 so i have to process only those files that arrived today. each dir comes with a prefix TNT and suffix as ctl* so i tried to use this command; ls -ltr TNT.*.*.*.ctl* | awk -F" " '{print $6" "$7 }' the output is: Feb 27 Feb 27 Feb 27 Feb 27 Feb 28 Feb 28 Mar 9 Mar 21 Mar 21 now i know that today ( Mar 21) there are 2 files that arrived. so i have to pick up ( or find ) these 2 files that arrived today and process them. thanks pavi |
|
#5
|
|||
|
|||
|
find command
Hello.,
find INFOSCAN.*.*.*.ctl* -exec ls -ltr {} \; | grep "Mar 21" the above command is working. but can nayone suggets me isntead of hard coding "Mar 21 " how can i get all the files for today's date. thanks pavi |
|
#6
|
|||
|
|||
|
Find gives you this already, there isn't any need to "ls" and "awk".
Try this: find . -name TNT.*.*.*.ctl* -mtime 1 This will look for all new files matching your spec modified today. |
|
#7
|
|||
|
|||
|
find command
Hello tmarikle
thanks man..your suggestion did wonders for me.. thanks a lot buddy.. have a nice day !!! |
|||
| Google The UNIX and Linux Forums |