How to find a file and just list the found files?
I use find / -name myfile to search files. But it will print out a very long list such as follow:
Code:
... Code:
... |
All those are "permission denied" ... the easy way to get rid of them is not look there.
Use find only on parts of the tree you have permission to look in. This also makes the search faster. The next best thing is to pipe the error messages to the bitbucket ... I'll explain: find / -name "myfile" -print 2> /dev/null You can also try locate ... which will find indexed files. |
Hi, try
locate file-name But it will find anything with those "file-name" characters. Locate may be packaged as mlocate, slocate, etc. Update the database locate needs, type updatedb you may need root access to run this. see how you go. cheers Glenn |
Many thanks!
|
Cool! Please notice the thumbs-up icon at the bottom of each post... better yet: go find someone else to help.
|
All times are GMT -5. The time now is 12:16 PM. |