The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-26-2002
Registered User
 

Join Date: Jun 2002
Posts: 2
Question mknod

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  
Old 06-26-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
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
As you can see, many more steps are required to create the file. In this example you can see the process required however
  #3  
Old 06-27-2002
Registered User
 

Join Date: Jun 2002
Posts: 2
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  
Old 06-28-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Did you try the command man mknod?
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0