![]() |
|
|
|
|
|||||||
| 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 | 10-25-2008 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 | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
find command
I want to find the file names those who contain a perticular pattern say"hakkinen".
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Use grep, read the man page.
Edit: sorry, misread the question, use find as era mentioned. Regards Last edited by Franklin52; 04-21-2008 at 09:05 AM. Reason: misread question |
|
#3
|
|||
|
|||
|
grep is for looking at the contents of a file..
If all the files are in the current directory, echo *hakkinen* or ls *hakkinen* or anything *hakkinen* -- read the manual for your shell for more on wildcards. If you want to find files in any directory (or any directory which is a subdirectory of a particular directory) the find command is the correct choice. Code:
find /path/to/dir -name '*hakkinen*' This is a very basic use case and is probably featured as an example in your local manual page for find |
|
#4
|
|||
|
|||
|
Use find / -iname "filename"
|
|
#5
|
|||
|
|||
|
I would use :
find / -iname "*hakkinen*" |
|||
| Google The UNIX and Linux Forums |