470,593 Members | 2,461 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,593 developers. It's quick & easy.

Search a directory for all files with a string in the file name

How do i search all the files in a directory in linux and get al list of all the files with the string "hello" in the name? Including subdirectories.
Jan 21 '22 #1
1 10112
269 256MB
The command shown below searches for files below the current directory.

If you want to display the directory, use the find command.
find . -name "*hello*" -print
use the du and grep command.
du -a | grep hello
If you don't want to see the directory, use the ls and grep command.
ls -R | grep hello
Jan 21 '22 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Mike Brashars | last post: by
39 posts views Thread by Joe Laughlin | last post: by
1 post views Thread by Prem | last post: by
6 posts views Thread by Jchick | last post: by
3 posts views Thread by Barry | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.