• Post Reply Bookmark Topic Watch Topic
  • New Topic

find  RSS feed

 
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to search a file in some subfolder in directory.
how to search the file which name is temp.txt
should i do
find temp.txt <directory>
please let me know.
thanks for your help
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
find . -name temp.txt -print
(modern versions of find will let you omit the "-print".)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!