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 04-02-2008, 07:55 AM   #1
jtek74
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Rep: Reputation: 0
commands for output?


I am sorry for such a simple question, but I need help on these small questions to get to the larger questions I have!
My original problem is with my internal multicard reader on my laptop. When I insert an SD card nothing at all happens. So in looking for answers to that problem I have created more questions!
All the articles I have read want some lspci thing and some other info but they dont say how to get this info. I know that it is commands entered in the console but I dont know what the commands are. I have seen dmseg? mentioned several times, and when I type lspci in my console I get an output but what other info would be needed and what are the commands?
My info: Kubuntu Gutsy Gibbon 7.10 kernel 2.6.22-14
Thanks in advance!
Jtek
 
Old 04-02-2008, 08:34 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
lspci lists the devices connected to the pci bus (in other word, the cards pluggud on the pci slots inside your computer). The SD multicard reader should be one of these.
Just type lspci on the command line and the post the result here so we see what type of card reader it is (who is the manufacturer and what driver it needs to function).
dmesg is a command to see what the kernel is doing. If it tryes to load a driver for your card reader but fails for some reason (maybe hardware failure or driver bug), you can see it with the dmesg command. Just type dmesg
 
Old 04-02-2008, 08:40 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
For all (well, at least most) programs installed on your computer, there should be a manual page, an info page or at least command line help. Open a terminal and type:
Code:
man dmesg
If that doesn't bring up anything or not enough information, try
Code:
info dmesg
And failing that, try:
Code:
dmesg --help
You can of course substitute any other command for dmesg in these exampls.

I find man pages to be the most helpful for discovering commands - I like the way they are arranged with the most brief information at the top and getting more detailed as you go through the page. By the way, press 'q' to quit the manual page browser and get back to the interactive shell.

My description of dmesg is that it prints out some diagnostic messages from the kernel (the core of the OS). These messages are things like hardware detection notifications, device errors and so on. It's output is a little messy, but it's helpful to see if hotplugged devices have been identified and so on.

lspci lists PCI bus devices. This is useful for identifying what hardware is connected to the system. With the -v option you can often find all sorts of information about that is connected to your system. Often you will discover information like the chipsets used in PCI devices. This is sometimes useful, as drivers are written per chipset, not per branded device (as many branded devices may use the same chipset and thus work with the same drivers). You should run it with sudo - this can give you more information than running without sudo. e.g.
Code:
sudo lspci -v
This will produce a of of output, but you can scroll back in konsole terminals, so it's no big deal. You can also pipe the output into less and use the cursors to scroll it about and / to search for text. q quits (less is the same text pager than man uses):
Code:
sudo lspci -v | less
Good luck with your SD card reader. I once gave up on one of these devices, but your mileage will vary depending on the device.
 
Old 04-02-2008, 08:42 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,201
Blog Entries: 3

Rep: Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426
Hi,

Linux Command Guide and Linux Newbie Admin Guide are two good guides to look at. The Rute Tutorial & Exposition is another good document for a newbie to get some useful information.

The above references should provide you with the means to work from the 'cli'. Just remember that you can always 'man command' to get a definition of the 'command' or online with 'LINUX MAN PAGES ONLINE'.

These links and others are available from 'Slackware-Links'
 
Old 04-02-2008, 09:29 AM   #5
jtek74
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for all the help so far! One problem with the man command is that only works if you know what the command name is! With learning linux i sometimes know the command in windows buy no idea in linux. But I will use the man pages.
My lspci output saysWell the applicable part anyway)

02:01.0 CardBus bridge: ENE Technology Inc CB-710/2/4 Cardbus Controller (rev 02)
02:01.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller

How can I see if the card is failing to mount? How could I see where linux would mount it if it worked? How do I know if the card reader is even loaded and active?
Thanks again for all the help! This is one of the reasons I love linux!
Jtek
 
Old 04-02-2008, 09:56 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by jtek74 View Post
Thanks for all the help so far! One problem with the man command is that only works if you know what the command name is!
Jtek
Try man -k <keyword>. e.g. "man -k file" will give you all the commands that deal with files.

Also learn to use grep to filter the output of things like lspci and dmesg

AND..try "lshw". If it is not installed already, it will be available using the package manager.
 
Old 04-02-2008, 10:40 AM   #7
jtek74
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Pixellany,
Thanks for the -k. That is awesome. Also, i ran the lshw which worked but said should run as super-user....meaning sudo?
Anyway the output:
*-pcmcia
description: CardBus bridge
product: CB-710/2/4 Cardbus Controller
vendor: ENE Technology Inc
physical id: 1
bus info: pci@0000:02:01.0
version: 02
width: 32 bits
clock: 33mhz
capabilities: pcmcia bus_master cap_list
configuration: driver=yenta_cardbus latency=176 maxlatency=5 mingnt=192 module=yenta_socket
*-memory UNCLAIMED
description: FLASH memory
product: CB710 Memory Card Reader Controller
vendor: ENE Technology Inc
physical id: 1.1
bus info: pci@0000:02:01.1
version: 00
width: 32 bits
clock: 33mhz
capabilities: cap_list
configuratio: latency=32

So hopefully this helps someone because it means nothing to me!
Jtek
 
Old 04-02-2008, 01:00 PM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Quote:
Originally Posted by jtek74 View Post
Thanks for all the help so far! One problem with the man command is that only works if you know what the command name is!
There is certainly an element of truth there. There are some ways to search though. The most useful one in my experience is the -k option - search manual page summaries for keywords. For example:
Code:
$ man -k camera
exif.py (1)          - extract EXIF information from digital camera image files
exifprobe (1)        - probe and report structure and metadata content of camera image files
exiftran (1)         - transform digital camera jpeg images
orient.py (1)        - change the orientation of a digital camera image file
sane-dc210 (5)       - SANE backend for Kodak DC210 Digital Camera
sane-dc240 (5)       - SANE backend for Kodak DC240 Digital Camera
sane-dc25 (5)        - SANE backend for Kodak DC20/DC25 Digital Cameras
sane-dmc (5)         - SANE backend for the Polaroid Digital Microscope Camera
sane-gphoto2 (5)     - SANE backend for gphoto2 supported cameras
sane-qcam (5)        - SANE backend for Connectix QuickCam cameras
sane-stv680 (5)      - SANE backend for STV680 camera's
Note the numbers in parenthesis after the page name. These are the manual sections. 1 means commands. This is the section you will meet most as a user (as opposed to a programmer or system admin). For a list of what the sections mean, see the "man" man page.

Quote:
With learning linux i sometimes know the command in windows buy no idea in linux. But I will use the man pages.
There's certainly an element of experience to these things. Another tip is to look at the SEE ALSO section in a manual page. Once you've found one thing in the subject area you are looking for, the SEE ALSO section can help guide you to other tools which might help.
Quote:
My lspci output saysWell the applicable part anyway)

02:01.0 CardBus bridge: ENE Technology Inc CB-710/2/4 Cardbus Controller (rev 02)
02:01.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller

How can I see if the card is failing to mount? How could I see where linux would mount it if it worked? How do I know if the card reader is even loaded and active?
Thanks again for all the help! This is one of the reasons I love linux!
Jtek
Assuming you're using KDE with Kubuntu, if it "just works" (which is the hope and intention) you'll get a dialog box pop up when you insert some media into the device (asking you if you want to browse the device or take some other action). If this doesn't work, then you might have some trouble... or at least some fiddling.

lspci will show devices even if they do not have drivers (the PCI bus has mechanisms for devices to identify themselves, and this is that lspci will show).

dmesg might provide some more information - run it directly after (say, 10 seconds after) inserting some media into the card reader and see if there is anything there.

If it doesn't appear to be working, google the output of lspci and/or dmesg. I googled for "CB-710/2/4 Cardbus Controller ubuntu", and found some messages describing difficulties with this device. I didn't spend a lot of time looking - maybe someone found a solution somewhere.

Another thing to try if you have the time is the new version of Ubuntu's LiveCD... often a new release will mean new hardware support. I found this with a bluetooth dongle which magically started to work after the upgrade from Edgy to Feisty.

If you have too much trouble, it might be worth getting a different device. I don't think such card readers are too expensive. While it's annoying to have hardware which doesn't work, it might be best to find a USB reader... of course google around to see if some prospective purchase is compatible.

Last edited by matthewg42; 08-29-2008 at 11:57 AM.
 
Old 04-02-2008, 01:42 PM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,201
Blog Entries: 3

Rep: Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426
Hi,

Another point that wasn't clarified is to use the 'man man' to understand how to use the command. You could also use the 'info' command for the 'info' format of the documentation.

As for not knowing what command(s) there are. You been given a lot of information towards that goal. The tutorials will aid you but repetition and investigation will strengthen your abilities.

BTW, the 'cli' is a very valuable tool to have in the toolbox!
 
Old 04-02-2008, 01:49 PM   #10
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
If the card reader is plugged in via usb port I've had the same issue only with devices I was trying to mount. Once I knew the address it was easy enough to mount the drive.
I got the address by tailing /var/log/messages ie:
tail /var/log/messages
do the above command right after you've plugged in the device. It should show you the address. In my case it was usually sdc,
so I would simply mount sdc1 and be good to go.
(Sorry if this does not apply for this problem, I wasn't sure so I decided to post just in case it might help).
 
Old 04-03-2008, 07:14 AM   #11
jtek74
LQ Newbie
 
Registered: Mar 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Wow! Thank you all so much for helping me out, I have alot of reading to do now! Had no idea the "man" pages were so helpfull and had so much info in them. Thanks for all the commands too! I have allready been using them to further my knowledge of liux!

Quote:
matthewg42
dmesg might provide some more information - run it directly after (say, 10 seconds after) inserting some media into the card reader and see if there is anything there.
Unfortunately when I insert the card NOTHING changes. Its like the reader doesn't even attempt to read and/or acknowledge a card has been inserted(though it works fine when I boot to windows xp).

Unfortunately this is not a USB card reader but an internal reader on my laptop.
I was just playing around with the card reader so if I have to wait until the next version of Kubuntu thats fine. It is the only thing that does not work absolutley perfect on my laptop w/ linux.

One last quick question and this one is probrably the simplest, but now that I am doing all this "man" research (hehe that sounds bad!) in the console, after I do say: man dmesg
How do I exit the information to get back to the command line?

Thanks again for everyone's help. This by far has been the most helpful site I have been on!
Jtek
 
Old 04-03-2008, 07:34 AM   #12
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Quote:
Originally Posted by jtek74 View Post
Unfortunately when I insert the card NOTHING changes. Its like the reader doesn't even attempt to read and/or acknowledge a card has been inserted(though it works fine when I boot to windows xp).
If there's nothing in the dmesg output then it's fair to say that the device is not recognised by the kernel. It's helpful to know this because there are higher level things which could also be a problem (like auto-mounter not handling the device).

Quote:
Unfortunately this is not a USB card reader but an internal reader on my laptop. I was just playing around with the card reader so if I have to wait until the next version of Kubuntu thats fine. It is the only thing that does not work absolutley perfect on my laptop w/ linux.
There's no guarantee with waiting of course, but you never know. I know the feeling of wanting to get everything working - especially when something is built into a laptop. However, sometimes it's a lot less hassle to admit defeat and buy a second, supported device. With something which is quite cheap that's not as much of a problem as it might seem while you're trying to get the original device going...

Quote:
One last quick question and this one is probrably the simplest, but now that I am doing all this "man" research (hehe that sounds bad!) in the console, after I do say: man dmesg
How do I exit the information to get back to the command line?
Press q. The man page output is sent to the program specified in the PAGER environment variable, or /usr/bin/pager if the env var is not set (see the man manual page for details about this). On most Linux systems, the pager is a program called less. See the less manual page for full details. You can press h to get quit help while in less.

A pager is just a program which takes long output and makes it more convenient to use in a terminal. An older popular pager on unix systems was called 'more'. 'less' is a play on that name. more is still around, but it's not as feature rich as less.

Last edited by matthewg42; 04-03-2008 at 07:35 AM.
 
Old 04-03-2008, 11:53 AM   #13
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,201
Blog Entries: 3

Rep: Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426Reputation: 1426
Hi,

You can also look at using 'most'.

'more' is 'less' than 'most' but 'most' is better than 'less' otherwise 'more'
 
Old 08-29-2008, 12:00 PM   #14
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
I looked again for this device, and found a bug report for it:

https://bugs.launchpad.net/ubuntu/+s...nux/+bug/31440

Apparently it sometimes eventually does work if you leave it for some minutes and are running KDE. Sounds like buggy driver though.
 
  


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
how to use one commands output vkmgeek Linux - Newbie 3 09-15-2007 11:04 AM
Correlate output from multiple commands wendtbd Programming 4 07-18-2007 07:16 AM
Output commands when programs run? TKS Slackware 2 12-12-2005 11:07 PM
Bash: How to concatenate the output of different commands? J_Szucs Programming 1 11-13-2003 07:43 AM
Using commands to output to files, how is this done? nro Linux - Newbie 3 11-11-2003 08:38 PM


All times are GMT -5. The time now is 01:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration