LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2001, 11:50 PM   #1
ederts
LQ Newbie
 
Registered: May 2001
Posts: 7

Rep: Reputation: 0

Hi! It's me again. I'm on the chapter that discuss about "Shells in a Nutshell". It illustrates how a command is interpreted by the shell.

This is the scenario. I log in as root and I'm on the root (/) directory. I want to search these external commands (ls, rm, cp, adduser, etc) but I can't find it using "find" command to search files.

The syntax is:
find [path ] [expression]

I typed:
[root@technical /]# find / adduser

But what happened was that it displayed all the files. Files that I don't want to find except on adduser. Like in MSDOS if I type: "dir myfile.doc /s /p" it should search on what directory I can locate the myfile.doc.

Any help? Sorry for asking just want to go around with this new OS. I already tried every option that I understand but still I can't make it.

Cheers,

Ederts

[Edited by ederts on 05-25-2001 at 12:53 AM]
 
Old 05-25-2001, 05:22 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
You want to use the following
Code:
find / -name adduser
If the file is in you path then you can also use
Code:
whereis find
One thing that caught me out for a while was the shell expanding wild cards on me, for example when I tried something like
Code:
find / -name *user
the search would fail (almost before it got started). The shell was trying to expand the *user in the same way it would if you issued 'rm *user', what you need to use in such situations is
Code:
find / -name \*user
to stop the shell being 'helpful'.

Man pages are your friends...

HTH

Jamie...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware in a nutshell? carlosinfl Slackware 21 05-07-2005 08:22 AM
I just bought a book called "Linux in a Nutshell" Mr. Hill Linux - Newbie 15 03-15-2005 12:26 PM
Linux in Nutshell vibhory2j Linux - General 4 09-01-2004 07:58 PM
Linux Partition in A Nutshell Please dsuratman Linux - Newbie 4 11-12-2003 05:20 AM
Shells andrewtc Linux - Newbie 3 05-01-2003 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration