LinuxQuestions.org
Review your favorite Linux distribution.
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 01-29-2010, 05:20 PM   #1
stonehinge03
LQ Newbie
 
Registered: Jan 2010
Posts: 21

Rep: Reputation: 15
Advice on contents of /dev/


I use ubuntu 9.10. I expected a "hexdump" of the files in /dev/ (on my system the directory is /dev/.udev/db) to give me a stream of bytes that are actually going in or out of various devices. Instead I get tiny little blocks or complaints that the file is not there if it is a link. Why doesn't this work?

Code:
root@server:/dev/.udev/db# hexdump -x net:eth0                                  0000000    3a45    4449    565f    4e45    4f44    5f52    5246    4d4f
0000010    445f    5441    4241    5341    3d45    4956    2041    6554
0000020    6863    6f6e    6f6c    6967    7365    202c    6e49    2e63
0000030    450a    493a    5f44    4f4d    4544    5f4c    5246    4d4f
0000040    445f    5441    4241    5341    3d45    5456    3136    3230
0000050    5b20    6852    6e69    2d65    4949    0a5d    3a45    4449
0000060    425f    5355    703d    6963    450a    493a    5f44    4556
0000070    444e    524f    495f    3d44    7830    3131    3630    450a
0000080    493a    5f44    4f4d    4544    5f4c    4449    303d    3378
0000090    3630    0a35
0000094
root@server:/dev/.udev/db# hexdump -x input:mice
hexdump: input:mice: No such file or directory
root@server:/dev/.udev/db# ls
block:fd0     misc:agpgart             tty:tty15  tty:tty57
block:loop0   misc:binder              tty:tty16  tty:tty58
block:loop1   misc:cpu_dma_latency     tty:tty17  tty:tty59
block:loop2   misc:device-mapper       tty:tty18  tty:tty6
block:loop3   misc:ecryptfs            tty:tty19  tty:tty60
block:loop4   misc:fuse                tty:tty2   tty:tty61
block:loop5   misc:hpet                tty:tty20  tty:tty62
block:loop6   misc:mcelog              tty:tty21  tty:tty63
block:loop7   misc:network_latency     tty:tty22  tty:tty7
block:ram0    misc:network_throughput  tty:tty23  tty:tty8
block:ram1    misc:pktcdvd             tty:tty24  tty:tty9
block:ram10   misc:psaux               tty:tty25  tty:ttyS0
block:ram11   misc:rfkill              tty:tty26  tty:ttyS1
block:ram12   misc:snapshot            tty:tty27  tty:ttyS2
block:ram13   net:eth0                 tty:tty28  tty:ttyS3
block:ram14   ppdev:parport0           tty:tty29  usbmon:usbmon0
block:ram15   ppp:ppp                  tty:tty3   usbmon:usbmon1
block:ram2    printer:lp0              tty:tty30  usbmon:usbmon2
block:ram3    rtc:rtc0                 tty:tty31  usbmon:usbmon3
block:ram4    scsi_generic:sg0         tty:tty32  usbmon:usbmon4
block:ram5    scsi_generic:sg1         tty:tty33  usbmon:usbmon5
block:ram6    scsi_generic:sg2         tty:tty34  usb:usb1
block:ram7    sound:adsp               tty:tty35  usb:usb2
block:ram8    sound:audio              tty:tty36  usb:usb3
block:ram9    sound:card0              tty:tty37  usb:usb4
block:sda     sound:controlC0          tty:tty38  usb:usb5
block:sda1    sound:dsp                tty:tty39  vc:vcs
block:sda2    sound:mixer              tty:tty4   vc:vcs1
block:sda5    sound:pcmC0D0c           tty:tty40  vc:vcs2
block:sr0     sound:pcmC0D0p           tty:tty41  vc:vcs3
block:sr1     sound:pcmC0D1c           tty:tty42  vc:vcs4
drm:card0     sound:pcmC0D1p           tty:tty43  vc:vcs5
input:event0  sound:seq                tty:tty44  vc:vcs6
input:event1  sound:sequencer          tty:tty45  vc:vcs7
input:event2  sound:sequencer2         tty:tty46  vc:vcs8
input:mice    sound:timer              tty:tty47  vc:vcsa
input:mouse0  tty:console              tty:tty48  vc:vcsa1
mem:full      tty:ptmx                 tty:tty49  vc:vcsa2
mem:kmsg      tty:tty                  tty:tty5   vc:vcsa3
mem:mem       tty:tty0                 tty:tty50  vc:vcsa4
mem:null      tty:tty1                 tty:tty51  vc:vcsa5
mem:oldmem    tty:tty10                tty:tty52  vc:vcsa6
mem:port      tty:tty11                tty:tty53  vc:vcsa7
mem:random    tty:tty12                tty:tty54  vc:vcsa8
mem:urandom   tty:tty13                tty:tty55
mem:zero      tty:tty14                tty:tty56
 
Old 01-29-2010, 08:26 PM   #2
stonehinge03
LQ Newbie
 
Registered: Jan 2010
Posts: 21

Original Poster
Rep: Reputation: 15
bump
 
Old 01-29-2010, 10:43 PM   #3
stonehinge03
LQ Newbie
 
Registered: Jan 2010
Posts: 21

Original Poster
Rep: Reputation: 15
This may not be the best forum for this question; it might be a complicated one. I thought there was some kind of basic lack of understanding on my part on what is in /dev/.
 
Old 01-30-2010, 02:04 PM   #4
stonehinge03
LQ Newbie
 
Registered: Jan 2010
Posts: 21

Original Poster
Rep: Reputation: 15
bump
 
Old 01-30-2010, 02:15 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Per the LQ Rules, please do not bump your own thread until at least 24 hours have elapsed without a reply. Because the LQ membership is global, people in other time zones may not have seen this post yet, and thus it may take some time before a response is received.
http://www.linuxquestions.org/rules.php
 
Old 01-31-2010, 12:26 PM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,185

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Further advice: bumping actually reduces the chance of getting answered, because it means your thread won't be found by those helpful people who routinely check for zero reply threads.
 
Old 01-31-2010, 12:52 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
[QUOTE=stonehinge03;3845464]I use ubuntu 9.10. I expected a "hexdump" of the files in /dev/ (on my system the directory is /dev/.udev/db) to give me a stream of bytes that are actually going in or out of various devices. Instead I get tiny little blocks or complaints that the file is not there if it is a link. Why doesn't this work?

hexdump reads the contents of a file, not the real-time data stream. Further, the contents of a device file is not the data going to/from a device.

What exactly are you trying to do?

(Also, in that directory, I don't seen anything remotely resembling what you show.)
 
Old 01-31-2010, 03:39 PM   #8
stonehinge03
LQ Newbie
 
Registered: Jan 2010
Posts: 21

Original Poster
Rep: Reputation: 15
I apologize to this board. It has never failed to answer any question I have ever posed to it (I've used several names over the years) but this question I didn't properly research. First off: the directory /dev/.udev/db is something used by udev and I don't want to interfere with the workings of that in anyway.

What I am trying to do is to read the character blocks that the kernel abstracts the data streams of the hardware into. Is there a command/program that will enable me to see hexadecimal values of those things? And will that be hexadecimal representations of the actual data stream that is coming from the device in question?

Last edited by stonehinge03; 01-31-2010 at 06:10 PM. Reason: didn't research it myself properly.
 
  


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
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
list contents of directory without listing contents baddah Linux - Newbie 2 06-12-2006 04:02 AM
Advice/References to build PHP dev env =dn Programming 3 03-12-2006 04:50 PM
contents of /dev change at every boot? rgiggs Slackware 2 07-02-2004 11:33 PM
/dev contents te_conway Linux - General 2 12-29-2001 10:46 PM

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

All times are GMT -5. The time now is 04:49 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