05-30-2008
The very first thing to understand is that these files are NOT the drivers for the devices. Drivers are in the kernel itself (/unix or /xenix or /stand/unix), and the files in /dev do not actually contain anything at all: they are just pointers to where the driver code can be found in the kernel. There is nothing more to it than that. These aren't programs, they aren't drivers, they are just pointers.
That also means that if the device file points at code that isn't in the kernel, it obviously is not going to work. Existence of a device file does not necessarily mean that the device code is in the kernel, and creating a device file (with mknod) does NOT create kernel code.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have to read a complete folder and if it is a file older that 7 days I have to copy it elsewhere and if it is a folder nothing to make.
The way I do it:
for I in `find /home/. -name "*" -mtime +7`
do
cp -Rf $I /home/elsewhere/.
done
Am I okay with the way I want to do it?
Help... (3 Replies)
Discussion started by: denysQC
3 Replies
2. Shell Programming and Scripting
Hi everybody,
This time I am having one issue in perl.
I have to create comma separated file using the following type of information. The problem is the columns do not have any specific delimiter. So while using split I am getting different value. Some where it is space(S) and some where it is... (9 Replies)
Discussion started by: Amiya Rath
9 Replies
3. Shell Programming and Scripting
Hi All,
I am new to this unix stuff.I just have one doubt:suppose i have two tar files and sometimes it happens that when we just check these files from outside these two tar files look same
"Eg:
ls -lrt
drw-r--r-- 1 oasis logadmin 37067 Apr 3 05:48 file1.tar
drw-r--r-- 1 oasis ... (7 Replies)
Discussion started by: siri_14
7 Replies
4. Shell Programming and Scripting
Can anyone decribe what would be differnce between the following scripts:
#nohup /bin/sh ./job 2>& 1&
# ./job > nohup.out &
Thanks
Alvida (1 Reply)
Discussion started by: alvida
1 Replies
5. Shell Programming and Scripting
I got two file write now.
Input file 1:
>data_1
DSFDFDSGFDSGSGEGTRTRERPOYIORPGKKGDSPKFSDKFPSDKFSPFS
>data_34
WEEREREWREWOIQOPIEPDSKLFNDSFNSKNCASKJHDAFHAOUDFEOWWIOUFEWIUEWIRUEWIRUEWIORUEWOREWR
>data_21
ASDASDQWEQWRQERFWPOTGIUWEIPOFIOFDSNFKSJDNFSKDHFKDSJHFKDSJHF
>data_4... (14 Replies)
Discussion started by: perl_beginner
14 Replies
6. UNIX for Dummies Questions & Answers
can anyone explain the difference between $* and $@?
pandeeswaran@ubuntu:~/training$ bash dollarstar 1 2 3 "4 5" 6
1
2
3
4
5
6
1
2
3
4
5
6
pandeeswaran@ubuntu:~/training$ cat dollarstar
#!/bin/bash
for i in $@
do (4 Replies)
Discussion started by: pandeesh
4 Replies
7. Shell Programming and Scripting
how to differentiate file and directory name using ls command.
l (3 Replies)
Discussion started by: jhon123
3 Replies
8. AIX
Folks,
Any idea of where can I find a specific file to differentiate JRE and Java JDK installed on AIX platform :cool: (3 Replies)
Discussion started by: dellcisco
3 Replies
9. Shell Programming and Scripting
Hello All,
I have 2 Type of files.
1. MYTEST001_RKP_DORALDO_20150402120000.zip
2. CMP001_STD001_MOGANO_RPSL_20150409_C.zip
I can receive these Two type of file at one location.
If i receive second type of file
CMP001_STD001_MOGANO_RPSL_20150409_C.zip I have to process without... (9 Replies)
Discussion started by: yadavricky
9 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I don't have tree on the Solaris server and our SA don't want to install it. I found this example from One Line Linux Command to Print Out Directory Tree Listing | systemBash that more or less does what I am mainly looking for.
Example run is as below:
$: find ./ | sed -e... (2 Replies)
Discussion started by: newbie_01
2 Replies
mknod(8) System Manager's Manual mknod(8)
NAME
mknod - Creates a special file
SYNOPSIS
/usr/sbin/mknod special_file [ b major_device# minor_device# | c major_device# minor_device#]
/usr/sbin/mknod filename p
DESCRIPTION
The mknod command makes a directory entry. The first argument is the name of the special device file. Select a name that is descriptive
of the device.
The mknod command has two forms. In the first form, the second argument is the b or c flag. The last two arguments are numbers specifying
the major_device, which helps the operating system find the device driver code, and the minor_device, the unit drive, or line number, which
may be either decimal or octal.
The assignment of major device numbers is specific to each system. You can determine the device numbers by examining the conf.c system
source file. If you change the contents of the conf.c file to add a device driver, you must rebuild the kernel.
In the second form of mknod, you use the p flag to create named pipes (FIFOs).
Only the superuser can create a character or device special file.
FLAGS
Indicates that the special file corresponds to a block-oriented device (disk or tape) Indicates that the special file corresponds to a
character-oriented device Creates named pipes (FIFOs)
EXAMPLES
To create the special file for a new drive, /dev/disk/dsk20, with a major device number of 1 and a minor device number of 2, enter: mknod
/dev/disk/dsk20 b 1 2 This command creates the special file, /dev/disk/dsk20, which is a block special file with major device number 1
and minor device number 2. To create a pipe named fifo, enter: mknod fifo p This command creates the pipe fifo, which is not necessarily
in the current directory.
FILES
Specifies the command path Specifies the system device numbers specification file delim off
mknod(8)