cdaf@iuvax.cs.indiana.edu (Charles Daffinger) (11/29/88)
On my machine (SR 9.7) I've accidently blasted /dev/null, and would like to know how to re-create it. Mknod a la real BSD is not there, nor the typical BSD shell script to create special files. Any suggestios? -charles -- Charles Daffinger >Take me to the river, Drop me in the water< (812) 339-7354 cdaf@iuvax.cs.indiana.edu {pur-ee,rutgers,pyramid,ames}!iuvax!cdaf Home of the Whitewater mailing list: whitewater-request@iuvax.cs.indiana.edu
dbfunk@ICAEN.UIOWA.EDU (David B. Funk) (11/29/88)
WRT how to recreate "/dev/null". "/dev/null" is a file that is one of Apollo's special types. It is a file, (of type "null") that when touched, invokes the type manager that provides the appropriate "null device" behaivor. The name or location of the file are of no consequence, just that it be of type "null". The type UID of an object can be seen with either the "/com/obty" utility or the "-tu" option on "/com/ld". You can create a new one from scratch with the "ios_$create" system call in a program, use the value "nulldev_$uid" for the third parameter. You can take a copy from the system device template directory "/sys/sysdev". If you want to copy the file "/sys/sysdev/null" be sure to use "/com/cpf", NOT "/bin/cp". UNIX doesn't understand an object oriented file system so it will ignore the type of the file and just try to copy the contents of it. This will just give you an empty ASCII file with no special typing. Aegis tools understand the importantce of the type of the files and will copy the containing type information, producing the desired results. IE. UNIX deals with file contents, Aegis deals with the file containers & contents. To make a long story short, issue the command: /com/cpf /sys/sysdev/null /dev/null ON THE MACHINE that you wish to replace a destroyed /dev/null. PS: you can use this trick to make "black-hole" files anywhere that you want. They can be usefull for soaking up unwanted program output, log files, etc, without having to messing around with I/O redirection. Dave Funk University of Iowa
cdaf@IUVAX.CS.INDIANA.EDU (Charles Daffinger) (11/30/88)
thanks. Mind if I post your description in a summary posting? -charles
sasgkh@sas.UUCP (Ken Howell) (12/01/88)
In article <15397@iuvax.cs.indiana.edu> cdaf@iuvax.UUCP (Charles Daffinger) writes: > >On my machine (SR 9.7) I've accidently blasted /dev/null, >and would like to know how to re-create it. Mknod Try the following Aegis commands: dlf /dev/null (if it exists) crf /dev/null obty /dev/null null This will create a zero length file and give it the appropriate type. -- Ken Howell ...!mcnc!rti!sas!sasgkh
paul@LEDZEP.CC.UMICH.EDU ('da Kingfish) (12/10/88)
(mknod seems to do OK at SR10) --paul