CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
how to find a certain file : with the terminal -

 



dilbert
User

Jul 13, 2014, 3:38 PM

Post #1 of 2 (858 views)
how to find a certain file : with the terminal - Can't Post

 
how to find a file that i have created yesterday ( note - it is a text-file)

i can use the following techniques on terminal



Code
find / -type f -exec grep "xxx" {} /dev/null \;



or this one



Code
find / -type f -print | pgrep "string to find"




Code
martin@linux-70ce:~/osmosis> find / -xdev -type f -print0 | xargs -0 grep -H "Olympus vg 160"




Code
find / -maxdepth 2 -type f ! -path '/proc/*' ! -path '/dev/*' -exec grep "xxx" {} +



- all the way seem to be good - but i do not find the certain file.

now i want to perform a search by time -

question: is this possible to do this with the terminal.


Laurent_R
Veteran / Moderator

Jul 15, 2014, 9:51 AM

Post #2 of 2 (354 views)
Re: [dilbert] how to find a certain file : with the terminal - [In reply to] Can't Post

This is not a Unix forum, but anyway, did you look at the '-name' option of find? It is probably what you need.

Something like this (can't test right now on my mobile device):


Code
find . -name file.txt -print


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives