Redirects, temporarily, the system console output to a specified device or file.
swcons PathName
The swcons command temporarily switches the system console output to a different target during system operation. This command only switches system informational-, error-, and intervention-required message output to the specified destination. The swcons command does not affect the operation of the system console device that is providing a login by way of the getty command.
The device or file specified when using this command remains the target for console output until changed by another swcons command, until the next start of the system, or until the console driver detects an error when accessing the designated device or file. If an open or write error is detected on the device or file specified by the swcons command, the console device driver switches all output back to the device or file that provided console support when the system was last started.
The PathName parameter must be a fully qualified path name to a device or file that is to receive system console message output. If the PathName parameter specifies a file that does not exist, the swcons command creates the file. If the file does exist, the swcons command appends any new console message output to the contents of the file.
Attention: Use of the swcons command to switch console output to an NFS mounted file system may cause the operating system to hang.
swcons /tmp/console.out
swcons /dev/tty3
swcons
/dev/console | Specifies the special file for system console access. |
/usr/sbin/swcons | Contains the swcons command file. |
The chcons command, lscons command.
The console special file.