LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-30-2004, 04:39 AM   #1
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Rep: Reputation: 46
Character special device files and block special device files


I tried the following commads and it didn't work.

ls /dev/dsk

ls /dev/rdsk

Why is that?


It is my understanding that dsk stands for character special device files and rdsk stands for block special device files.

How do I find those files in my Mandrake Linux 10.0 version?
 
Old 11-30-2004, 04:46 AM   #2
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Original Poster
Rep: Reputation: 46
Logical device names and instant names

The following command should show the logical device names. It didn't work on my Mandrake Linux 10.0

ls /dev/dsk/cotodoso

--------------------------------------------------------------------------


The following command should give me the instant names. Those names are related to hardware. However, it didn't work.

ls more /etc/path_to_inst
 
Old 11-30-2004, 06:22 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I'm not sure what you are trying to do. You can use the command 'mount' to get a list of the mounted devices and the mount points.
Or you could type 'cat /etc/mtab' to show the same thing.

Another way is 'cat /proc/mounts' which is where the mount command gets its information.
The /etc/fstab file is where the system gets the information on what devices should be mounted
when you boot up the computer.
 
Old 11-30-2004, 10:10 AM   #4
gunter
Member
 
Registered: Jan 2003
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
I'm not sure what your goal is, but you are obviously misinformed. All device files appear under /dev. Some are block, some are character... Try ls -l /dev Typically, the hard drive is hda or hdb, the floppy is fd0, cdrom hdc, hdd printer lp0, etc. The full document that describes each device comes with the linux kernel documentation.
 
Old 11-30-2004, 10:54 AM   #5
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Original Poster
Rep: Reputation: 46
gunter

I looked at a computer which has the Solaris operating system. The above mentioned command works fine in Solaris. So my friend who works with Solaris told me it would be possible to find them in Linux environnent too.

He said in Linux these things rests in a specific folder. In Solaris you find them in a folder called device folder. It has even the 'dev' folder too.

My Mandrake doesn't have a folder called 'device folder'. I have the 'dev' folder, however.

How do you find those block special device files and character special files in Linux?
 
Old 11-30-2004, 10:58 AM   #6
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Original Poster
Rep: Reputation: 46
ls more /etc/path_to_inst
The above command gives you some valuble information about hardware in Solaris. It tells you the instant names related to hardware.

How do you find the above in Linux? I have Mandrake LInux 10.0.


I looked at a computer which has the Solaris operating system. The above mentioned command works fine in Solaris. So my friend who works with Solaris told me it would be possible to find them in Linux environnent too.
 
Old 11-30-2004, 12:50 PM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Gins - your 2 identical threads have been merged.
 
Old 11-30-2004, 03:35 PM   #8
Gins
Senior Member
 
Registered: Jul 2004
Location: Germany
Distribution: open SUSE 11.0, Fedora 7 and Mandriva 2007
Posts: 1,638

Original Poster
Rep: Reputation: 46
gunter

I wrote the command you mentioned. What are the block files and what are the character files? I copied some of the oupupt for your information.

I guess c stands for character files.

What are the block files? What are the instant files?
--------------------------------------------------------------------
[heden@h27n2fls301o1037 heden]$ ls -l /dev | more
total 0



lr-xr-xr-x 1 root root 12 Nov 30 16:28 agpgart -> misc/agpgart
lr-xr-xr-x 1 root root 13 Nov 30 17:28 apm_bios -> misc/apm_bios
lr-xr-xr-x 1 root root 11 Nov 30 16:29 audio -> sound/audio
lr-xr-xr-x 1 root root 13 Nov 30 16:29 cdrom -> cdroms/cdrom0
lr-xr-xr-x 1 root root 13 Nov 30 16:29 cdrom0 -> cdroms/cdrom0
lr-xr-xr-x 1 root root 13 Nov 30 16:29 cdrom1 -> cdroms/cdrom1
drwxr-xr-x 1 root root 0 Jan 1 1970 cdroms/
crw------- 1 nissanka root 5, 1 Nov 30 16:29 console
lr-xr-xr-x 1 root root 15 Nov 30 19:46 dac960_gam -> misc/dac960_gam
drwxr-xr-x 1 root root 0 Jan 1 1970 discs/
lr-xr-xr-x 1 root root 12 Nov 30 16:29 dmmidi -> sound/dmmidi
lr-xr-xr-x 1 root root 9 Nov 30 16:29 dsp -> sound/dsp
drwxr-xr-x 1 root root 0 Jan 1 1970 fb/
lr-xr-xr-x 1 root root 4 Nov 30 17:28 fb0 -> fb/0
lr-xr-xr-x 1 root root 13 Nov 30 17:28 fd -> /proc/self/fd/
lr-xr-xr-x 1 root root 8 Nov 30 16:29 fd0 -> floppy/0
lr-xr-xr-x 1 root root 13 Nov 30 16:29 fd0u1040 -> floppy/0u1040
lr-xr-xr-x 1 root root 13 Nov 30 16:29 fd0u1120 -> floppy/0u1120


lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram4 -> rd/4
lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram5 -> rd/5
lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram6 -> rd/6
lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram7 -> rd/7
lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram8 -> rd/8
lr-xr-xr-x 1 root root 4 Nov 30 17:28 ram9 -> rd/9
crw-r--r-- 1 root root 1, 8 Jan 1 1970 random
drwxr-xr-x 1 root root 0 Jan 1 1970 rd/
brwx------ 1 root root 3, 9 Nov 30 17:28 root
lr-xr-xr-x 1 root root 4 Nov 30 17:28 root.old -> rd/0
lr-xr-xr-x 1 root root 8 Nov 30 17:28 rtc -> misc/rtc
drwxr-xr-x 1 root root 0 Jan 1 1970 scsi/
lr-xr-xr-x 1 root root 15 Nov 30 16:29 sequencer -> sound/sequencer
lr-xr-xr-x 1 root root 16 Nov 30 16:29 sequencer2 -> sound/sequencer2
drwxr-xr-x 1 root root 0 Jan 1 1970 shm/
drwxr-xr-x 1 root root 0 Jan 1 1970 snd/
drwxr-xr-x 1 root root 0 Jan 1 1970 sound/
lr-xr-xr-x 1 root root 4 Nov 30 17:28 stderr -> fd/2
lr-xr-xr-x 1 root root 4 Nov 30 17:28 stdin -> fd/0
lr-xr-xr-x 1 root root 4 Nov 30 17:28 stdout -> fd/1|
drwxr-xr-x 1 root root 0 Jan 1 1970 tts/
crw-rw-rw- 1 root root 5, 0 Jan 1 1970 tty
lr-xr-xr-x 1 root root 4 Nov 30 17:28 tty0 -> vc/0
lr-xr-xr-x 1 root root 4 Nov 30 17:28 tty1 -> vc/1
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty10 -> vc/10
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty11 -> vc/11
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty12 -> vc/12
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty13 -> vc/13
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty14 -> vc/14
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty15 -> vc/15
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty16 -> vc/16
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty17 -> vc/17
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty18 -> vc/18
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty19 -> vc/19
lr-xr-xr-x 1 root root 4 Nov 30 17:28 tty2 -> vc/2
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty20 -> vc/20
lr-xr-xr-x 1 root root 5 Nov 30 17:28 tty21 -> vc/21
lr-xr-xr-x 1 root root 5 Nov 30 17:28

Last edited by Gins; 11-30-2004 at 03:37 PM.
 
Old 11-30-2004, 09:17 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
A block device is a random access device such as a hard drive. If you follow the link to were your hard disk drivers are located and 'ls -l' you can see a description of these files.

I have never heard of instant files. You seem to be taking general instructions, such as cd install-directory, literally.

If you want to learn about Linux, I would recommend forgetting about solaris and reading documentation found with your system, or going to the www.tldp.org web site. There are many howto's and books available.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Device names Fredstar *BSD 2 06-17-2005 09:03 PM
Network Device Names predator.hawk Linux - Hardware 3 01-03-2005 03:07 PM
SAMBA: display of share names is OK but files names are wrong superandrzej Linux - Software 5 02-02-2004 10:14 AM
Mounted Device names Rodzilla Linux - Newbie 7 09-25-2003 11:39 AM
How to determine device names yian Linux - General 2 10-21-2002 08:56 PM


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