Problem to command

Hi,
I'm not able to find out one folder called "Downloads" by this
find . -name "*ownloads*"

Open in new window

any advice?
LVL 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick FinleyNetwork EngineerCommented:
try using locate instead of 'find' and remove the period after 'find'
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry, I get this

[huamin@CentOS65x64 /]$ locate -name "*ownloads*"
locate: invalid value `ame' of --limit
0
Mick FinleyNetwork EngineerCommented:
remove the -name

locate "*ownloads*"
0
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

ThomasMcA2Commented:
Using find followed by a period only looks in folders below the current folder. When I run your command from my home folder, it works:

username ~ $ cd
username ~ $ pwd
/home/username
username ~ $ find . -name "*ownloads*"
./.kde4/share/apps/khtml/easylistdownloadsadblockplusorgeasylistnoelemhide.txt
./.thunderbird/lsqi76kk.default/downloads.json
./.moonchild productions/pale moon/ocmjoebb.default/downloads.sqlite
./Downloads

Open in new window

0
Mick FinleyNetwork EngineerCommented:
locate will search all directories, usually used at root level
0
serialbandCommented:
locate actually looks up the file in a previously indexed database and the database is generally indexed once per day, so any new items may not appear with locate.

Where are you running your find command?

That dot '.' tells find to search in your current folder.  If your current folder doesn't contain the any files or folders that match "*ownloads*", then it won't find anything.

If you want to find a file in a particular directory, then change the dot '.' to the folder name.

Search the entire root folder for "*ownloads*"
find / -name "*ownloads*"

Search the entire /users/ folder for "*ownloads*"
find /users/ -name "*ownloads*"

Search the entire /home/ folder for "*ownloads*"
find /home/ -name "*ownloads*"
0
gheistCommented:
locate -i download
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
serialbandCommented:
Were you able to find your [Dd]ownloads folder?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.