![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mknod | sbn | HP-UX | 4 | 05-28-2008 01:15 PM |
| Help:NFS mknod failed | steeles | SUN Solaris | 0 | 01-25-2008 09:05 AM |
| mknod system call to clone /dev/null | nathan | High Level Programming | 2 | 09-19-2006 09:46 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can someone please tell me what the command mknod does and what it's syntax is? I can't find it in my "Unix for dummies" book or "Unix in s nutshell". I found it in an existing script that I want to copy, but I want to understand what I am doing. The script is going to do a full export of an Oracle database. I suspect that this command is pre-creating the output file, and making it special in some way, like giving it extra security or something, but I don't really know.
Thanks, Beginner Bonnie |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
In order to use mknod you need to know the major and minor node numbers for the device you wish to create. The devices.txt file in the kernel source documentation is the canonical source of this information.
To take an example, suppose that version of the MAKEDEV script does not know how to create the /dev/ttyS0 device file. Then you need to use mknod to create it. From looking at the devices.txt file that it should be a character device with major number 4 and minor number 64. So you now know all you need to create the file. Exp: Code:
# mknod /dev/ttyS0 c 4 64 # chown root.dialout /dev/ttyS0 # chmod 0644 /dev/ttyS0 # ls -l /dev/ttyS0 crw-rw---- 1 root dialout 4, 64 Oct 23 18:23 /dev/ttyS0 |
|
#3
|
|||
|
|||
|
That does not address my particular situation. I'm sorry, I should have included the specific code I was referring to:
rm -f pipefile /etc/mknod pipefile p nohup cat pipefile | /usr/contrib/bin/gzip >/oracleb/home/dba/exp/exp_full_MWOD.dmp.gz 2>/oracleb/home/dba/exp/cat_errors.log& exp file=pipefile full=y consistent=y userid=sys/xxx log=/oracleb/home/dba/exp/exp_full_MWOD.log buffer=10000000 compress=y Is "pipefile" something special? A device? What does the "p" indicate? Thanks! Beginner Bonnie |
|
#4
|
||||
|
||||
|
Did you try the command man mknod?
|
||||
| Google The UNIX and Linux Forums |