LinuxQuestions.org
Visit Jeremy's Blog.
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 11-08-2006, 10:46 AM   #1
er20ic
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
how do I write a command?


This is really basic and I apologise in advance - but you are all so helpful!
How - and where -do I write a command such as:
grep -B 1 "THOMSON
ALCATEL" /proc/bus/usb/devices
I need to do this (and more) to configure my asdl internet connection in Ubuntu. Do I go back to the boot place? Is there a cursor? Do I type anything in front of the above? Is there a place I can learn about DOS commands?
Thanks for your altruism and expertise on this site.
 
Old 11-08-2006, 10:48 AM   #2
hepburnenthorpe
Member
 
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
Quote:
Is there a place I can learn about DOS commands?
DOS is miscrosoft. its not called MS DOS for nothing. Most Linux systems ship with bash.

You need to open a terminal and type your commands there.
 
Old 11-08-2006, 10:51 AM   #3
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Commands are typed into a shell. DOS is not used within Linux so there is no need to learn DOS (unless of course you want to learn it). If you are using KDE or GNOME look for a shell or Terminal somewhere in the menu.
There are various shells to use, I believe yours will be Bash shell by default.

Hope that helps some.
 
Old 11-08-2006, 11:24 AM   #4
er20ic
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks, I found a terminal! It has my machine then
:~$
then the cursor. When I typed the above message nothing happened. Could someone tell me what to type to check if it works?
 
Old 11-08-2006, 11:26 AM   #5
Broder
Member
 
Registered: Oct 2006
Location: Santa Barbara, C.A.
Distribution: Mood dependent
Posts: 117

Rep: Reputation: 15
In ubuntu I have found that the terminal is not as easy to locate as in most distros. You should find it in Applications -> Accessories -> Terminal.

Someone (sorry, I can't remember who!) posted up this link yesterday: which is a good introduction to learning linux commands.
 
Old 11-08-2006, 11:27 AM   #6
Broder
Member
 
Registered: Oct 2006
Location: Santa Barbara, C.A.
Distribution: Mood dependent
Posts: 117

Rep: Reputation: 15
http://www.ee.surrey.ac.uk/Teaching/Unix/

Apologies, I didn't put in the link!
 
Old 11-08-2006, 11:28 AM   #7
Broder
Member
 
Registered: Oct 2006
Location: Santa Barbara, C.A.
Distribution: Mood dependent
Posts: 117

Rep: Reputation: 15
Try:

ls - that will list the current files in the directory.

It's unlikely your terminal "won't work".

What is it that you are trying to do?

Last edited by Broder; 11-08-2006 at 11:43 AM.
 
Old 11-08-2006, 11:45 AM   #8
er20ic
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Yes, that's brilliant. Thanks to all and sorry about using the MS word. Goodbye to all that (one day)
 
Old 11-08-2006, 08:25 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
FYI, you'll find that Unix (Linux) cmd line cmds are 'quiet' by default ie so long as there's no (cmd) error, you won't get any output/reply unless you asked for it.
Of course ls is an output type cmd.
If you want to check for an error, use the cmd
echo $?
immediately after running a cmd.
Any num other than 0 (zero) indicates an error.

You should really bookmark and read the following sites. They'll save you a lot of time learning:
http://rute.2038bug.com/index.html.gz
http://www.faqs.org/docs/bashman/bashref.html#SEC_Top
http://www.tldp.org/LDP/abs/html/index.html


Feel free to ask qns here if anything isn't clear.
 
Old 11-08-2006, 09:17 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by er20ic
Thanks, I found a terminal! It has my machine then
:~$
then the cursor. When I typed the above message nothing happened. Could someone tell me what to type to check if it works?
If you used grep and nothing happened, it simply means that grep did not find a match.

Keep in mind that Linux is case-sensitive (ie THOMSON and thomson are two different things).

I suggest you do it this way:
Code:
cd /proc/bus/usb
more devices
As you scroll thru it, you should be able to see pretty quickly if your thing is there.

When you DO use grep, use the shortest combination of letters that is likely to get a unique match. In this case, something like:
Code:
cat devices|grep thom
    (OR)
cat devices|grep Thom
etc.

finally, got to TLDP.org and get the Bash Guide for Beginners by Machtelt Garrels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Disabling 'write command' hirenpandya Linux - Security 9 03-03-2009 06:10 PM
how to write command line program? vito_huang Linux - Software 3 04-14-2006 01:20 AM
How to write Invisible Command rktech83 Linux - General 1 03-09-2006 03:03 AM
Write a command cont... ricki Programming 2 07-31-2005 04:53 PM
problem in write command mtest Programming 3 10-30-2003 07:30 AM


All times are GMT -5. The time now is 08:59 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration