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 12
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'
HuaMin ChenProblem resolverAuthor Commented:
Sorry, I get this

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

locate "*ownloads*"
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

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

Mick FinleyNetwork EngineerCommented:
locate will search all directories, usually used at root level
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*"
gheistCommented:
locate -i download

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?
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.