fd man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

fd(4)									 fd(4)

NAME
       fd - file descriptor files

DESCRIPTION
       The  /dev/fd  file  system  is a pseudo-file system layered beneath the
       Virtual File System (VFS).  The file descriptor files (fd*)  are	 those
       files  that are accessible through file descriptors.  The file descrip‐
       tors use the naming convention /dev/fd/0, /dev/fd/1, /dev/fd/2  and  so
       on up to any number.

       To make the /dev/fd file system known to the operating system, you must
       create the directory with the correct privileges, then you  must	 mount
       the file system.	 The following steps describe how to create the direc‐
       tory, mount the file system both manually and automatically, and how to
       dismount	 the  file  system:  Create  the directory using the mkdir and
       chmod commands: mkdir /dev/fd; chmod 777 /dev/fd Mount the file	system
       manually	 using	the mount command: mount -t fdfs /dev/fd /dev/fd Mount
       the file system automatically by editing either the /etc/fstab file  or
       the /sbin/bcheckrc file.

	      Add  the following entry to the /etc/fstab file: /dev/fd /dev/fd
	      fdfs rw 0 0 This entry mounts the pseudodevice  /dev/fd  on  the
	      /dev/fd  directory  with read/write privileges.  The file system
	      type is fdfs and the zeros (0) in the remaining  fields  specify
	      that  the file system is not to be backed up nor can file system
	      checks be performed by the fsck command as  this	is  a  virtual
	      file system.

	      Add  the	following  entry to the /sbin/bcheckrc file: # # mount
	      fdfs # echo 'Mounting /dev/fd filesystem' /sbin/mount -a	-v  -t
	      fdfs  Again,  the	 /dev/fd  file system should not be mounted in
	      this manner if an entire system is to be backed up starting from
	      the  root	 directory.  Dismount the file system using the umount
	      command: umount /dev/fd For correct truncate()  behavior	on  fd
	      files, you must load your program using the -lsys5 flag.

RESTRICTIONS
       The /dev/fd file descriptors should not be exported.

EXAMPLES
       The following example show how the open and dup functions have the same
       effect if file descriptor n is opened:

       fd = open("/dev/fd/n", mode);
       fd = dup(n);

       In the above example, the open function is equal to the creat  function
       and  mode  is  ignored.	 Using	the  dup function, subsequent reads or
       writes on the fd file descriptor files fail unless  the	original  file
       descriptor enables the operation.

ERRORS
       The following error condition exists: The file descriptor is not valid.

RELATED INFORMATION
       Commands: chmod(1), mkdir(1), mount(8).

       Functions: creat(2), dup(2), open(2).  delim off

									 fd(4)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net