Журнал лабораторных работ

Содержание

Журнал

Среда (11/28/12)

/dev/pts/0
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
12:45:32
$vimetd.conf
#
#auth   stream  tcp     wait    root    /usr/local/sbin/identd  identd -w -t120
#
# Example entry for the optional qmail MTA
#  NOTE: This is no longer the correct way to handle incoming SMTP
#        connections for qmail.  Use tcpserver (http://cr.yp.to/ucspi-tcp.html)
#        instead.
#
#smtp   stream  tcp     nowait  qmaild  /var/qmail/bin/tcp-env  tcp-env /var/qmaa
il/bin/qmail-smtpd
...
il/bin/qmail-smtpd
#
# Enable the following two entries to enable samba startup from inetd
# (from the Samba documentation).  Enable the third entry to enable the swat
# samba configuration tool.
#
#netbios-ssn stream tcp nowait          root    /usr/local/sbin/smbd    smbd
#netbios-ns dgram udp   wait            root    /usr/local/sbin/nmbd    nmbd
#swat   stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
#auth   stream  tcp6    nowait  root    internalexec   msat   117,1         98%
/dev/pts/0
12:45:49
$cd ..

12:45:51
$cd ..

12:45:52
$cd ..

12:45:52
$cd ..

12:45:53
$cd ..

12:45:53
$cd usr

12:46:02
$cd share

12:46:17
$ls
calendar        groff_font      misc            sendmail        tmac
dict            info            mk              skel            vi
doc             locale          nls             snmp            zoneinfo
examples        man             openssl         syscons
games           me              security        tabset
12:46:29
$cd doc

/dev/pts/0
12:46:30
$egrep " ([^ ]*) " /tmp/ssh_cong
#       $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $
#       $FreeBSD: src/crypto/openssh/ssh_config,v 1.34.2.2.4.1 2010/12/21 17:09:25 kensmith Exp $
# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
...
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   VersionAddendum FreeBSD-20100308
/dev/pts/0
12:46:34
$ls
IPv6    atm     bind9   legal   ncurses ntp     papers  psd     smm     usd
/dev/pts/0
12:46:35
$egrep -n [^ ]*) \1" /tmp/ssh_cong
4:# This is the ssh client system-wide configuration file.  See
5:# ssh_config(5) for more information.  This file provides defaults for
10:#  1. command line options
11:#  2. user-specific file
12:#  3. system-wide file
17:# Site-wide defaults for some commonly used options.  For a comprehensive
22:#   ForwardAgent no
23:#   ForwardX11 no
24:#   RhostsRSAAuthentication no
25:#   RSAAuthentication yes
...
40:#   Cipher 3des
41:#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
42:#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
43:#   EscapeChar ~
44:#   Tunnel no
45:#   TunnelDevice any:any
46:#   PermitLocalCommand no
47:#   VisualHostKey no
48:#   ProxyCommand ssh -q -W %h:%p gateway.example.com
49:#   VersionAddendum FreeBSD-20100308
/dev/pts/0
12:46:38
$ls -l
total 20
drwxr-xr-x   2 root  wheel   512 Feb 18  2011 IPv6
drwxr-xr-x   2 root  wheel   512 Feb 18  2011 atm
drwxr-xr-x   4 root  wheel   512 Feb 18  2011 bind9
drwxr-xr-x   5 root  wheel   512 Feb 18  2011 legal
drwxr-xr-x   2 root  wheel   512 Feb 18  2011 ncurses
drwxr-xr-x   2 root  wheel  1536 Feb 18  2011 ntp
drwxr-xr-x   2 root  wheel   512 Feb 18  2011 papers
drwxr-xr-x  23 root  wheel   512 Feb 18  2011 psd
drwxr-xr-x  13 root  wheel   512 Feb 18  2011 smm
drwxr-xr-x  13 root  wheel   512 Feb 18  2011 usd
/dev/pts/0
12:46:41
$egrep -n " ([^ ]*)" /tmp/ssh_cong
1:#     $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $
2:#     $FreeBSD: src/crypto/openssh/ssh_config,v 1.34.2.2.4.1 2010/12/21 17:09:25 kensmith Exp $
4:# This is the ssh client system-wide configuration file.  See
5:# ssh_config(5) for more information.  This file provides defaults for
6:# users, and the values can be changed in per-user configuration files
7:# or on the command line.
9:# Configuration data is parsed as follows:
10:#  1. command line options
11:#  2. user-specific file
12:#  3. system-wide file
...
40:#   Cipher 3des
41:#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
42:#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
43:#   EscapeChar ~
44:#   Tunnel no
45:#   TunnelDevice any:any
46:#   PermitLocalCommand no
47:#   VisualHostKey no
48:#   ProxyCommand ssh -q -W %h:%p gateway.example.com
49:#   VersionAddendum FreeBSD-20100308
12:46:47
$egrep -n " ([^ ]*) \1tmp/ssh_cong
4:# This is the ssh client system-wide configuration file.  See
5:# ssh_config(5) for more information.  This file provides defaults for
10:#  1. command line options
11:#  2. user-specific file
12:#  3. system-wide file
17:# Site-wide defaults for some commonly used options.  For a comprehensive
22:#   ForwardAgent no
23:#   ForwardX11 no
24:#   RhostsRSAAuthentication no
25:#   RSAAuthentication yes
...
40:#   Cipher 3des
41:#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
42:#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
43:#   EscapeChar ~
44:#   Tunnel no
45:#   TunnelDevice any:any
46:#   PermitLocalCommand no
47:#   VisualHostKey no
48:#   ProxyCommand ssh -q -W %h:%p gateway.example.com
49:#   VersionAddendum FreeBSD-20100308
12:46:57
$sed 's/:.*//' /etc/passwd | wc -c
     137
/dev/pts/0
12:47:02
$find /usr/share/doc -name \*.txt -exec grep -l 'GNU grep'

12:47:02
$find /usr/share/doc -name \*.txt -exec grep -l 'GNU grep'
find: -exec: no terminating ";" or "+"
/dev/pts/0
12:47:06
$grepetd.conf

12:47:06
$grepetd.conf

12:47:06
$grepetd.conf

12:47:06
$grepetd.conf

12:47:06
$grepetd.conf

12:47:06
$grepetd.conf

/dev/pts/0
12:47:52
$sed 's/:.*//' /etc/passwd
# $FreeBSD
#
root
toor
daemon
operator
bin
tty
kmem
games
...
mailnull
bind
proxy
_pflogd
_dhcp
uucp
pop
www
nobody
user
12:48:19
$sed 's/://' /etc/passwd
# $FreeBSD src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root*:0:0:Charlie &:/root:/usr/local/bin/bash
toor*:0:0:Bourne-again Superuser:/root:
daemon*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator*:2:5:System &:/:/usr/sbin/nologin
bin*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user*:1001:1001:User &:/home/user:/usr/local/bin/bash
/dev/pts/0
12:48:31
$grep -inetd.conf

12:48:31
$grep -inetd.conf

12:48:31
$grep -inetd.conf

12:48:31
$grep -inetd.conf

/dev/pts/0
12:48:40
$sed '' /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:48:49
$sed 's/://' /etc/passwd
# $FreeBSD src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root*:0:0:Charlie &:/root:/usr/local/bin/bash
toor*:0:0:Bourne-again Superuser:/root:
daemon*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator*:2:5:System &:/:/usr/sbin/nologin
bin*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:48:52
$sed 's/://' /etc/passwd
# $FreeBSD src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root*:0:0:Charlie &:/root:/usr/local/bin/bash
toor*:0:0:Bourne-again Superuser:/root:
daemon*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator*:2:5:System &:/:/usr/sbin/nologin
bin*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user*:1001:1001:User &:/home/user:/usr/local/bin/bash
/dev/pts/0
12:48:53
$grep -i 'ab|net'

12:48:53
$grep -i 'ab|net'

12:48:53
$grep -i 'ab|net'

/dev/pts/0
12:48:55
$sed 's/:.*//' /etc/passwd
# $FreeBSD
#
root
toor
daemon
operator
bin
tty
kmem
games
...
mailnull
bind
proxy
_pflogd
_dhcp
uucp
pop
www
nobody
user
12:48:58
$cat /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
/dev/pts/0
12:49:00
$find /usr/share/doc -name \*.txt -exec grep -l 'GNU grep'
find: -exec: no terminating ";" or "+"
/dev/pts/0
12:49:44
$cat passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:49:44
$cat passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:49:44
$cat passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:50:10
$egrep 'oo|log' passwd
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
12:51:08
$egrep 'varasswd
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
12:51:31
$egrep 'v|l' passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
...
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:51:49
$egrep 'a passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:51:49
$egrep 'a passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:51:49
$egrep 'a passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
root:*:0:0:Charlie &:/root:/usr/local/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
user:*:1001:1001:User &:/home/user:/usr/local/bin/bash
12:52:11
$egrep 'w passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:11
$egrep 'w passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:11
$egrep 'w passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
news:*:8:8:News Subsystem:/:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:19
$egrep 'wd passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
12:52:19
$egrep 'wd passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
12:52:19
$egrep 'wd passwd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
/dev/pts/0
12:52:31
$ls -l
total 8
-rw-r--r--  1 user  wheel  3234 Nov 27 20:25 dirlist
drwxr-xr-x  2 user  wheel  2048 Nov 27 20:23 etccopy
-rw-r--r--  1 user  wheel  1683 Nov 28 13:11 ssh_cong
/dev/pts/0
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:32
$egrep 'wd|wnsswd
# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.6.1 2010/12/21 17:09:25 kensmith Exp $
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
12:52:52
$egrep FreeBSD ~/texts
egrep: /home/user/texts: No such file or directory
/dev/pts/0
12:54:14
$pwd
/usr/share/doc
/dev/pts/0
12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

12:55:00
$egrep FreeBSD ~/text

/dev/pts/0
12:55:04
$touch /tmp/text_to_sed

/dev/pts/0
12:55:06