1.\" 2.\" Copyright (c) 2010 The DragonFly Project. All rights reserved. 3.\" 4.\" This code is derived from software contributed to The DragonFly Project 5.\" by Nolan Lum <nol888@gmail.com> 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in 15.\" the documentation and/or other materials provided with the 16.\" distribution. 17.\" 3. Neither the name of The DragonFly Project nor the names of its 18.\" contributors may be used to endorse or promote products derived 19.\" from this software without specific, prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 27.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 31.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.Dd December 6, 2010 34.Os 35.Dt DEVATTR 8 36.Sh NAME 37.Nm devattr 38.Nd tool for displaying devices and their associated properties 39.Sh SYNOPSIS 40.Nm 41.Op Fl Ah 42.Op Fl p Ar property 43.Op Fl d Ar device 44.Op Fl m Ar key:value 45.Op Fl r Ar key:value 46.Sh DESCRIPTION 47The 48.Nm 49tool is for displaying a list of devices and some 50associated properties such as their name. 51This tool exposes the same functionality provided by the 52.Xr devattr 3 53library, namely the filtering capabilities offered. 54.Pp 55The options are as follows: 56.Bl -tag -width indent 57.It Fl A 58Excludes aliases from the listing. 59.\" 60.It Fl h 61Displays a help message. 62.\" 63.It Fl p 64Only display the specified 65.Ar property . 66This can be can be specified multiple times and combined 67with all other options. 68.\" 69.It Fl d 70Only display devices with name 71.Ar device . 72When used with 73.Fl p , 74only the specified properties of 75.Ar device 76are listed. 77Can be specified multiple times. 78Allows wildcards. 79.\" 80.It Fl m 81Only display devices whose property 82.Ar key 83matches with wildcards value 84.Ar value 85unless the key\-value pair starts with ~, in which case 86the match is inverted. 87Stacks with 88.Fl p , 89.Fl d , 90.Fl m . 91Can be specified multiple times. 92.\" 93.It Fl r 94Behaves similarly to 95.Fl m , 96but matches with regex. 97.Sh EXAMPLES 98List all devices named 'pts/0': 99.Bd -ragged -offset indent 100.Nm Fl d 101pts/0 102.Ed 103.Pp 104List all devices whose major number is 64: 105.Bd -ragged -offset indent 106.Nm Fl m 107major:64 108.Ed 109.Pp 110List all devices whose name is 'pts/0' and major number is not 64: 111.Bd -ragged -offset indent 112.Nm Fl d 113pts/0 114.Fl m 115~major:64 116.Ed 117.Sh SEE ALSO 118.Xr devattr 3 , 119.Xr udevd 8 120.Sh AUTHORS 121.An Nolan Lum 122