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

Содержание

Журнал

Вторник (07/08/08)

/dev/ttyp1
15:58:12
#grep -v root /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $
#
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
...
_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
messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:1001:0:User &:/home/user:/usr/local/bin/bash
15:58:30
#grep -v root /etc/passwd | grep root

15:58:36
#grep -i Root /etc/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
15:58:44
#grep -q root /etc/passwd

15:58:57
#grep -q root /etc/passwd ; echo $?
0
15:59:06
#grep -q sergey /etc/passwd ; echo $?
1
16:00:20
#grep -q sergey /etc/passwd && echo Yes\,\ this\ name\ is\ pre

16:00:20
#grep -q sergey /etc/passwd && echo "Yes, this name is
>
16:00:45
#grep -q sergey /etc/passwd && echo "Yes, this name is present
 || echo "This name does`t present"
>
16:01:12
#grep -q sergey /etc/pass&& echo "Yes, this name is present" |

16:01:12
#cat /etc/pgrep -q sergey && echo "Yes, this name is present"

16:01:12
#cat /etc/passwd | grep -q sergey && echo "Yes, this name is p
esent" || echo "This name does\`t present
This name does`t present
16:01:41
#grep -q rooy /etc/passwd && echo "Yes, this name is present"

16:01:41
#grep -q root
Yes, this name is present
16:02:05
#grep -q root /etc/passwd && echo "Yes, this name is

16:02:05
#grep -q root /etc/passwd && echo $?
0
16:02:27
#grep -q sergey /etc/passwd && echo $?

16:02:41
#grep -q sergey /etc/passwd ; echo $?
1
16:03:23
#grep -v "^\#|^\ *$" /usr/local/etc/gdm/gdm.conf
# GDM Custom Configuration file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration.   If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration.  Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# This file overrides the default configuration settings.  These settings
...
[server-VNC]
name=VNC server
command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
#securitytypes=none
flexible=true
# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the GDM System Defaults configuration
# file.  It is currently not possible to disable a [server-foo] section
# defined in the GDM System Defaults configuration file.
#
16:04:10
#grep -v "^\#|^\ *$" /usr/local/etc/gdm/gdm.conf | cat -n
     1  # GDM Custom Configuration file.
     2  #
     3  # This file is the appropriate place for specifying your customizations to the
     4  # GDM configuration.   If you run gdmsetup, it will automatically edit this
     5  # file for you and will cause the daemon and any running GDM GUI programs to
     6  # automatically update with the new configuration.  Not all configuration
     7  # options are supported by gdmsetup, so to modify some values it may be
     8  # necessary to modify this file directly by hand.
     9  #
    10  # This file overrides the default configuration settings.  These settings
...
    80  [server-VNC]
    81  name=VNC server
    82  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
    83  #securitytypes=none
    84  flexible=true
    85  # Also note, that if you redefine a [server-foo] section, then GDM will
    86  # use the definition in this file, not the GDM System Defaults configuration
    87  # file.  It is currently not possible to disable a [server-foo] section
    88  # defined in the GDM System Defaults configuration file.
    89  #
16:04:20
#grep -v "^\#|^\ *$"$? /usr/local/etc/gdm/gdm.conf

16:04:20
#grep -v "^\#|^\ *$"$?."This name

16:04:20
#cat -n
     1  # GDM Custom Configuration file.
     2  #
     3  # This file is the appropriate place for specifying your customizations to the
     4  # GDM configuration.   If you run gdmsetup, it will automatically edit this
     5  # file for you and will cause the daemon and any running GDM GUI programs to
     6  # automatically update with the new configuration.  Not all configuration
     7  # options are supported by gdmsetup, so to modify some values it may be
     8  # necessary to modify this file directly by hand.
     9  #
    10  # This file overrides the default configuration settings.  These settings
...
    80  [server-VNC]
    81  name=VNC server
    82  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
    83  #securitytypes=none
    84  flexible=true
    85  # Also note, that if you redefine a [server-foo] section, then GDM will
    86  # use the definition in this file, not the GDM System Defaults configuration
    87  # file.  It is currently not possible to disable a [server-foo] section
    88  # defined in the GDM System Defaults configuration file.
    89  #
16:04:38
#egrep -v "^\#|^\ *$" /usr/local/etc/gdm/gdm.conf | cat -n
     1  [daemon]
     2  VTAllocation=false
     3  Greeter /usr/local/libexec/gdmlogin
     4  [security]
     5  [xdmcp]
     6  Enable=1
     7  HonorIndirect=1
     8  [gui]
     9  [greeter]
    10  [chooser]
    11  [debug]
    12  Enable=true
    13  [servers]
    14  0=VNC
    15  [server-VNC]
    16  name=VNC server
    17  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
    18  flexible=true
16:04:45
#grep -E -v "^\#|^\ *$" /usr/local/etc/gdm/gdm.conf | cat -n
     1  [daemon]
     2  VTAllocation=false
     3  Greeter /usr/local/libexec/gdmlogin
     4  [security]
     5  [xdmcp]
     6  Enable=1
     7  HonorIndirect=1
     8  [gui]
     9  [greeter]
    10  [chooser]
    11  [debug]
    12  Enable=true
    13  [servers]
    14  0=VNC
    15  [server-VNC]
    16  name=VNC server
    17  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
    18  flexible=true
16:05:11
#grep -F -v "^\#|^\ *$" /usr/local/etc/gdm/gdm.conf | cat -n
     1  # GDM Custom Configuration file.
     2  #
     3  # This file is the appropriate place for specifying your customizations to the
     4  # GDM configuration.   If you run gdmsetup, it will automatically edit this
     5  # file for you and will cause the daemon and any running GDM GUI programs to
     6  # automatically update with the new configuration.  Not all configuration
     7  # options are supported by gdmsetup, so to modify some values it may be
     8  # necessary to modify this file directly by hand.
     9  #
    10  # This file overrides the default configuration settings.  These settings
...
    80  [server-VNC]
    81  name=VNC server
    82  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
    83  #securitytypes=none
    84  flexible=true
    85  # Also note, that if you redefine a [server-foo] section, then GDM will
    86  # use the definition in this file, not the GDM System Defaults configuration
    87  # file.  It is currently not possible to disable a [server-foo] section
    88  # defined in the GDM System Defaults configuration file.
    89  #
16:05:24
#sed --help
Usage: gsed [OPTION]... {script-only-if-no-other-script} [input-file]...
  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if extension supplied)
  -l N, --line-length=N
...
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
      --help     display this help and exit
      --version  output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
E-mail bug reports to: bonzini@gnu.org .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
16:05:44
#sed --help | less
16:05:52
#cat /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:1001:0:User &:/home/user:/usr/local/bin/bash
16:06:00
#cat /etc/passwd | sed s/:/\/
# $FreeBSD src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user*:1001:0:User &:/home/user:/usr/local/bin/bash
16:06:07
#cat /etc/passwd | sed s/:/\ /
# $FreeBSD  src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus *:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit *:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi *:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm *:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user *:1001:0:User &:/home/user:/usr/local/bin/bash
16:06:13
#cat /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:1001:0:User &:/home/user:/usr/local/bin/bash
16:06:19
#cat /etc/passwd | sed s/:/\ /
# $FreeBSD  src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus *:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit *:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi *:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm *:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user *:1001:0:User &:/home/user:/usr/local/bin/bash
16:06:21
#cat /etc/passwd | sed s/:/\ /g
# $FreeBSD  src/etc/master.passwd,v 1.40 2005/06/06 20 19 56 brooks 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
...
_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
messagebus * 556 556 D-BUS Daemon User /nonexistent /sbin/nologin
polkit * 562 562 PolicyKit Daemon User /nonexistent /sbin/nologin
avahi * 558 558 Avahi Daemon User /nonexistent /sbin/nologin
gdm * 92 92 GNOME Display Manager /nonexistent /sbin/nologin
user * 1001 0 User & /home/user /usr/local/bin/bash
16:06:25
#cat /etc/passwd | sed s/[0-9]//g
# $FreeBSD: src/etc/master.passwd,v . // :: brooks Exp $
#
root:*:::Charlie &:/root:/usr/local/bin/bash
toor:*:::Bourne-again Superuser:/root:
daemon:*:::Owner of many system processes:/root:/usr/sbin/nologin
operator:*:::System &:/:/usr/sbin/nologin
bin:*:::Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:::Tty Sandbox:/:/usr/sbin/nologin
kmem:*:::KMem Sandbox:/:/usr/sbin/nologin
games:*:::Games pseudo-user:/usr/games:/usr/sbin/nologin
...
_dhcp:*:::dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:::UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:::Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:::World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:::Unprivileged user:/nonexistent:/usr/sbin/nologin
messagebus:*:::D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:::PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:::Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:::GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:::User &:/home/user:/usr/local/bin/bash
16:06:36
#cat /etc/passwd | sed s/:/\ /g
# $FreeBSD  src/etc/master.passwd,v 1.40 2005/06/06 20 19 56 brooks 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
...
_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
messagebus * 556 556 D-BUS Daemon User /nonexistent /sbin/nologin
polkit * 562 562 PolicyKit Daemon User /nonexistent /sbin/nologin
avahi * 558 558 Avahi Daemon User /nonexistent /sbin/nologin
gdm * 92 92 GNOME Display Manager /nonexistent /sbin/nologin
user * 1001 0 User & /home/user /usr/local/bin/bash
16:06:40
#cat /etc/passwd | sed s/[0-9]//g
# $FreeBSD: src/etc/master.passwd,v . // :: brooks Exp $
#
root:*:::Charlie &:/root:/usr/local/bin/bash
toor:*:::Bourne-again Superuser:/root:
daemon:*:::Owner of many system processes:/root:/usr/sbin/nologin
operator:*:::System &:/:/usr/sbin/nologin
bin:*:::Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:::Tty Sandbox:/:/usr/sbin/nologin
kmem:*:::KMem Sandbox:/:/usr/sbin/nologin
games:*:::Games pseudo-user:/usr/games:/usr/sbin/nologin
...
_dhcp:*:::dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:::UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:::Post Office Owner:/nonexistent:/usr/sbin/nologin
www:*:::World Wide Web Owner:/nonexistent:/usr/sbin/nologin
nobody:*:::Unprivileged user:/nonexistent:/usr/sbin/nologin
messagebus:*:::D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:::PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:::Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:::GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:::User &:/home/user:/usr/local/bin/bash
16:06:43
#cat /etc/passwd | sed s/[0-9,A-Z]//g
# $ree: src/etc/master.passwdv . // :: brooks xp $
#
root:*:::harlie &:/root:/usr/local/bin/bash
toor:*:::ourne-again uperuser:/root:
daemon:*:::wner of many system processes:/root:/usr/sbin/nologin
operator:*:::ystem &:/:/usr/sbin/nologin
bin:*:::inaries ommands and ource:/:/usr/sbin/nologin
tty:*:::ty andbox:/:/usr/sbin/nologin
kmem:*:::em andbox:/:/usr/sbin/nologin
games:*:::ames pseudo-user:/usr/games:/usr/sbin/nologin
...
_dhcp:*:::dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*::: pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
pop:*:::ost ffice wner:/nonexistent:/usr/sbin/nologin
www:*:::orld ide eb wner:/nonexistent:/usr/sbin/nologin
nobody:*:::nprivileged user:/nonexistent:/usr/sbin/nologin
messagebus:*:::- aemon ser:/nonexistent:/sbin/nologin
polkit:*:::olicyit aemon ser:/nonexistent:/sbin/nologin
avahi:*:::vahi aemon ser:/nonexistent:/sbin/nologin
gdm:*::: isplay anager:/nonexistent:/sbin/nologin
user:*:::ser &:/home/user:/usr/local/bin/bash
16:06:53
#cat /etc/passwd | sed s/[0-9,A-Z,a-z]//g
# $: //. . // ::   $
#
:*::: &:/:////
:*:::- :/:
:*:::    :/:///
:*::: &:/:///
:*:::   :/:///
:*::: :/:///
:*::: :/:///
:*::: -://:///
...
_:*::: ://:///
:*::: -:///://///
:*:::  :/:///
:*:::   :/:///
:*::: :/:///
:*:::-  :/://
:*:::  :/://
:*:::  :/://
:*:::  :/://
:*::: &://:////
16:07:10
#who
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:07:12
#who | sed s/ROOT/root/
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:07:21
#who | sed s/ROOT/root/g
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:07:24
#who | sed s/root/ROOT/
ROOT             ttyv0     8 ÉÀÌ 11:30
ROOT             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
ROOT             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
ROOT             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
ROOT             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:07:41
#who | sed 5d
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
16:07:55
#who | sed 1i\
> test string
gsed: can't read string: No such file or directory
16:08:14
#who | sed 1itest string
gsed: can't read string: No such file or directory
16:08:16
#who | sed 1i\
> TEST
TEST
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:08:24
#who | sed 1iteststring
teststring
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:08:34
#who | sed 1ateststring
root             ttyv0     8 ÉÀÌ 11:30
teststring
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:08:40
#who | sed s/\n//
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:08:53
#who | sed s/\ //
root            ttyv0     8 ÉÀÌ 11:30
root            ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root            ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root            ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root            ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:08:58
#who | sed s/\ ,\t//
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:09:17
#who | sed s/\t//
roo             ttyv0     8 ÉÀÌ 11:30
roo             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
roo             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
roo             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
roo             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:09:21
#who | sed =
1
root             ttyv0     8 ÉÀÌ 11:30
2
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
3
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
4
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
5
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:09:37
#w | sed /root/ c\
> Nothing
gsed: -e expression #1, char 6: missing command
16:10:06
#w | sed `/root/ cNothing`
bash: /root/: Ñ×ÌÑÅÔÓÑ ÄÉÒÅËÔÏÒÉÅÊ
Usage: gsed [OPTION]... {script-only-if-no-other-script} [input-file]...
  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if extension supplied)
...
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
      --help     display this help and exit
      --version  output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
E-mail bug reports to: bonzini@gnu.org .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
16:10:12
#w | sed '/root/ cNothing'
16:10  up  4:41, 5 users, load averages: 0,47 0,42 0,31
USER             TTY      FROM              LOGIN@  IDLE WHAT
Nothing
Nothing
Nothing
Nothing
Nothing
16:10:43
#vim name
16:11:00
#~
Igor
Andrey
Boris
Sergey
"names" 4 lines, 25 characters
16:11:05
#~

16:11:05
#cat s
cat: s: No such file or directory
16:11:09
#cat names
Igor
Andrey
Boris
Sergey
16:11:12
#sed -i -e s/Igor/Irorjek/
gsed: no input files
16:11:39
#sed -i -e s/Igor/Irorjek/ names

16:11:44
#cat names
Irorjek
Andrey
Boris
Sergey
16:11:46
#sed -i -e s/Igor/Irorjek/ names

16:12:12
#echo `IP` | mail -s subject e@mail

16:12:54
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255
        ether 00:16:4e:00:00:01
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
16:12:57
#ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255
        ether 00:16:4e:00:00:01
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
16:12:59
#ifconfig re0 | grep inet
        inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255
16:13:06
#ifconfig re0 | grep inet | awk '{print$2}'
192.168.16.21
16:14:43
#cat /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:1001:0:User &:/home/user:/usr/local/bin/bash
16:15:07
#cat /etc/passwd | cut -d ':' -f 1
# $FreeBSD
#
root
toor
daemon
operator
bin
tty
kmem
games
...
_dhcp
uucp
pop
www
nobody
messagebus
polkit
avahi
gdm
user
16:15:19
#cat /etc/passwd | awk -F ':' '{print$1 user}'
# $FreeBSD
#
root
toor
daemon
operator
bin
tty
kmem
games
...
_dhcp
uucp
pop
www
nobody
messagebus
polkit
avahi
gdm
user
16:15:46
#cat /etc/passwd | awk -F ':' '{print$1" user"}'
# $FreeBSD user
# user
root user
toor user
daemon user
operator user
bin user
tty user
kmem user
games user
...
_dhcp user
uucp user
pop user
www user
nobody user
messagebus user
polkit user
avahi user
gdm user
user user
16:15:55
#cat /etc/passwd | awk -F ':' '{print$1" horoshij user"}'
# $FreeBSD horoshij user
# horoshij user
root horoshij user
toor horoshij user
daemon horoshij user
operator horoshij user
bin horoshij user
tty horoshij user
kmem horoshij user
games horoshij user
...
_dhcp horoshij user
uucp horoshij user
pop horoshij user
www horoshij user
nobody horoshij user
messagebus horoshij user
polkit horoshij user
avahi horoshij user
gdm horoshij user
user horoshij user
16:16:06
#cat /etc/passwd | awk -F ':' '{print$1}'
# $FreeBSD
#
root
toor
daemon
operator
bin
tty
kmem
games
...
_dhcp
uucp
pop
www
nobody
messagebus
polkit
avahi
gdm
user
16:16:14
#папа
bash: папа: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ
16:17:51
#who | sed 1itest string

16:25:12
#Ñ
bash: Ñ: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ
16:25:15
#who
root             ttyv0     8 ÉÀÌ 11:30
root             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
root             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
root             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
root             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:25:18
#who | sed s/root/ROOT/
ROOT             ttyv0     8 ÉÀÌ 11:30
ROOT             ttyp1     8 ÉÀÌ 15:10 (:ttyp4:S.0)
ROOT             ttyp3     8 ÉÀÌ 11:59 (192.168.16.214)
ROOT             ttyp5     8 ÉÀÌ 12:25 (192.168.16.215)
ROOT             ttyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:25:24
#who | sed y/root/ROOT/
ROOT             TTyv0     8 ÉÀÌ 11:30
ROOT             TTyp1     8 ÉÀÌ 15:10 (:TTyp4:S.0)
ROOT             TTyp3     8 ÉÀÌ 11:59 (192.168.16.214)
ROOT             TTyp5     8 ÉÀÌ 12:25 (192.168.16.215)
ROOT             TTyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:25:31
#who | sed y/root/ROOZ/
ROOZ             ZZyv0     8 ÉÀÌ 11:30
ROOZ             ZZyp1     8 ÉÀÌ 15:10 (:ZZyp4:S.0)
ROOZ             ZZyp3     8 ÉÀÌ 11:59 (192.168.16.214)
ROOZ             ZZyp5     8 ÉÀÌ 12:25 (192.168.16.215)
ROOZ             ZZyp7     8 ÉÀÌ 13:23 (192.168.16.215)
16:26:03
#cat /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
...
_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
messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
user:*:1001:0:User &:/home/user:/usr/local/bin/bash
16:26:34
#cat /etc/passwd | tr d[:punct:]
usage: tr [-Ccsu] string1 string2
       tr [-Ccu] -d string1
       tr [-Ccu] -s string1
       tr [-Ccu] -ds string1 string2
16:26:48
#cat /etc/passwd | tr -d [:punct:]
 FreeBSD srcetcmasterpasswdv 140 20050606 201956 brooks Exp
root00Charlie rootusrlocalbinbash
toor00Bourneagain Superuserroot
daemon11Owner of many system processesrootusrsbinnologin
operator25System usrsbinnologin
bin37Binaries Commands and Sourceusrsbinnologin
tty465533Tty Sandboxusrsbinnologin
kmem565533KMem Sandboxusrsbinnologin
games713Games pseudouserusrgamesusrsbinnologin
news88News Subsystemusrsbinnologin
...
dhcp6565dhcp programsvaremptyusrsbinnologin
uucp6666UUCP pseudouservarspooluucppublicusrlocallibexecuucpuucico
pop686Post Office Ownernonexistentusrsbinnologin
www8080World Wide Web Ownernonexistentusrsbinnologin
nobody6553465534Unprivileged usernonexistentusrsbinnologin
messagebus556556DBUS Daemon Usernonexistentsbinnologin
polkit562562PolicyKit Daemon Usernonexistentsbinnologin
avahi558558Avahi Daemon Usernonexistentsbinnologin
gdm9292GNOME Display Managernonexistentsbinnologin
user10010User homeuserusrlocalbinbash
16:26:53
#cat /etc/passwd | tr -d [:punct:],[:digit:]
 FreeBSD srcetcmasterpasswdv    brooks Exp
rootCharlie rootusrlocalbinbash
toorBourneagain Superuserroot
daemonOwner of many system processesrootusrsbinnologin
operatorSystem usrsbinnologin
binBinaries Commands and Sourceusrsbinnologin
ttyTty Sandboxusrsbinnologin
kmemKMem Sandboxusrsbinnologin
gamesGames pseudouserusrgamesusrsbinnologin
newsNews Subsystemusrsbinnologin
...
dhcpdhcp programsvaremptyusrsbinnologin
uucpUUCP pseudouservarspooluucppublicusrlocallibexecuucpuucico
popPost Office Ownernonexistentusrsbinnologin
wwwWorld Wide Web Ownernonexistentusrsbinnologin
nobodyUnprivileged usernonexistentusrsbinnologin
messagebusDBUS Daemon Usernonexistentsbinnologin
polkitPolicyKit Daemon Usernonexistentsbinnologin
avahiAvahi Daemon Usernonexistentsbinnologin
gdmGNOME Display Managernonexistentsbinnologin
userUser homeuserusrlocalbinbash
16:27:06
#cat /etc/passwd | tr -d [:punct:],[:digit:],[:upper:]
 ree srcetcmasterpasswdv    brooks xp
rootharlie rootusrlocalbinbash
toorourneagain uperuserroot
daemonwner of many system processesrootusrsbinnologin
operatorystem usrsbinnologin
bininaries ommands and ourceusrsbinnologin
ttyty andboxusrsbinnologin
kmemem andboxusrsbinnologin
gamesames pseudouserusrgamesusrsbinnologin
newsews ubsystemusrsbinnologin
...
dhcpdhcp programsvaremptyusrsbinnologin
uucp pseudouservarspooluucppublicusrlocallibexecuucpuucico
popost ffice wnernonexistentusrsbinnologin
wwworld ide eb wnernonexistentusrsbinnologin
nobodynprivileged usernonexistentusrsbinnologin
messagebus aemon sernonexistentsbinnologin
polkitolicyit aemon sernonexistentsbinnologin
avahivahi aemon sernonexistentsbinnologin
gdm isplay anagernonexistentsbinnologin
userser homeuserusrlocalbinbash
16:27:30
#cat /etc/passwd | tr -d [:punct:],[:digit:],[:upper:],[:lower

16:27:30
#cat /etc/passwd | tr -d '\n'

16:27:46
#cat /etc/passwd | tr -d '\nr

16:27:59
#vim tr
16:28:09
#$FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp

16:28:09
#sed 's/://g' /etc/passwd
# $FreeBSD src/etc/master.passwd,v 1.40 2005/06/06 201956 brooks Exp $
#
root*00Charlie &/root/usr/local/bin/bash
toor*00Bourne-again Superuser/root
daemon*11Owner of many system processes/root/usr/sbin/nologin
operator*25System &//usr/sbin/nologin
bin*37Binaries Commands and Source//usr/sbin/nologin
tty*465533Tty Sandbox//usr/sbin/nologin
kmem*565533KMem Sandbox//usr/sbin/nologin
games*713Games pseudo-user/usr/games/usr/sbin/nologin
...
_dhcp*6565dhcp programs/var/empty/usr/sbin/nologin
uucp*6666UUCP pseudo-user/var/spool/uucppublic/usr/local/libexec/uucp/uucico
pop*686Post Office Owner/nonexistent/usr/sbin/nologin
www*8080World Wide Web Owner/nonexistent/usr/sbin/nologin
nobody*6553465534Unprivileged user/nonexistent/usr/sbin/nologin
messagebus*556556D-BUS Daemon User/nonexistent/sbin/nologin
polkit*562562PolicyKit Daemon User/nonexistent/sbin/nologin
avahi*558558Avahi Daemon User/nonexistent/sbin/nologin
gdm*9292GNOME Display Manager/nonexistent/sbin/nologin
user*10010User &/home/user/usr/local/bin/bash
прошло 13 минут
/dev/ttyp9
16:41:13
#tail -f /var/log/messages
Jul  8 16:38:17 fbsd1 gdm-binary[55545]: WARNING: failsafe dialog failed (inhibitions: 0 0)
Jul  8 16:38:18 fbsd1 gdm-binary[62293]: Gtk-WARNING: Ignoring the separator setting
Jul  8 13:38:18 fbsd1 kernel: pid 62293 (gdm-binary), uid 92: exited on signal 6
Jul  8 16:38:18 fbsd1 gdm-binary[55545]: WARNING: failsafe dialog failed (inhibitions: 0 1)
Jul  8 16:38:18 fbsd1 gdm-binary[62294]: Gtk-WARNING: Ignoring the separator setting
Jul  8 13:38:18 fbsd1 kernel: pid 62294 (gdm-binary), uid 92: exited on signal 6
Jul  8 16:38:18 fbsd1 gdm-binary[55545]: WARNING: failsafe dialog failed (inhibitions: 1 1)
Jul  8 13:38:18 fbsd1 kernel: pid 62291 (gdmgreeter), uid 92: exited on signal 6 (core dumped)
Jul  8 13:38:35 fbsd1 kernel: pid 62304 (gdmlogin), uid 92: exited on signal 6 (core dumped)
Jul  8 16:38:35 fbsd1 gdm-binary[55545]: WARNING: The display server has been shut down about 6 times in the last 90 seconds. It is likely that something bad is going on.  Waiting for 2 minutes before trying again on display :0.
...
Jul  8 13:44:52 fbsd1 kernel: pid 62806 (gdm-binary), uid 92: exited on signal 6
Jul  8 16:44:52 fbsd1 gdm-binary[62765]: WARNING: failsafe dialog failed (inhibitions: 0 0)
Jul  8 16:44:52 fbsd1 gdm-binary[62807]: Gtk-WARNING: Ignoring the separator setting
Jul  8 13:44:52 fbsd1 kernel: pid 62807 (gdm-binary), uid 92: exited on signal 6
Jul  8 16:44:52 fbsd1 gdm-binary[62765]: WARNING: failsafe dialog failed (inhibitions: 0 1)
Jul  8 16:44:52 fbsd1 gdm-binary[62808]: Gtk-WARNING: Ignoring the separator setting
Jul  8 13:44:52 fbsd1 kernel: pid 62808 (gdm-binary), uid 92: exited on signal 6
Jul  8 16:44:52 fbsd1 gdm-binary[62765]: WARNING: failsafe dialog failed (inhibitions: 1 1)
Jul  8 13:44:54 fbsd1 kernel: pid 62805 (gdmgreeter), uid 92: exited on signal 6 (core dumped)
^C
/dev/ttypb
16:41:23
#ps aux | grep gdm

16:41:31
#ps wux | grep gdm
root 55545  0.0  0.6 12304  6216  ??  Is    1:58PM   0:02.39 /usr/local/sbin/gdm-binary
root 62305  0.0  0.6 12308  6220  ??  I     4:38PM   0:00.00 /usr/local/sbin/gdm-binary
root 62502  0.0  0.1  1596  1008  pc  S+    4:41PM   0:00.00 grep gdm
16:41:34
#/usr/local/etc/rc.d/gdm restart
Stopping gdm.
Waiting for PIDS: 55545, 55545, 55545, 55545, 55545.
Starting gdm.
/dev/ttyp1
16:41:50
#sed 's/://g' && 's/*//' /etc/passwd
bash: s/*//: No such file or directory
/dev/ttypb
16:42:26
#vim /usr/local/etc

Файлы

  • -n
  • /etc/passwd
  • names
  • -n
    >
         1  # GDM Custom Configuration file.
         2  #
         3  # This file is the appropriate place for specifying your customizations to the
         4  # GDM configuration.   If you run gdmsetup, it will automatically edit this
         5  # file for you and will cause the daemon and any running GDM GUI programs to
         6  # automatically update with the new configuration.  Not all configuration
         7  # options are supported by gdmsetup, so to modify some values it may be
         8  # necessary to modify this file directly by hand.
         9  #
        10  # This file overrides the default configuration settings.  These settings
        11  # are stored in the GDM System Defaults configuration file, which is found
        12  # at the following location.
        13  #
        14  # /usr/local/share/gdm/defaults.conf.
        15  #
        16  # This file contains comments about the meaning of each configuration option,
        17  # so is also a useful reference.  Also refer to the documentation links at
        18  # the end of this comment for further information.  In short, to hand-edit
        19  # this file, simply add or modify the key=value combination in the
        20  # appropriate section in the template below this comment section.
        21  #
        22  # For example, if you want to specify a different value for the Enable key
        23  # in the "[debug]" section of your GDM System Defaults configuration file,
        24  # then add "Enable=true" in the "[debug]" section of this file.  If the
        25  # key already exists in this file, then simply modify it.
        26  #
        27  # Older versions of GDM used the "gdm.conf" file for configuration.  If your
        28  # system has an old gdm.conf file on the system, it will be used instead of
        29  # this file - so changes made to this file will not take effect.  Consider
        30  # migrating your configuration to this file and removing the gdm.conf file.
        31  #
        32  # If you hand edit a GDM configuration file, you can run the following
        33  # command and the GDM daemon will immediately reflect the change.  Any
        34  # running GDM GUI programs will also be notified to update with the new
        35  # configuration.
        36  #
        37  # gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
        38  #
        39  # e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
        40  #
        41  # You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
        42  # re-read the new configuration settings.  You can also restart GDM by sending
        43  # a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
        44  # any user session started by GDM to exit immediately while USR1 behaves like
        45  # gdm-safe-restart and will wait until all users log out before restarting GDM.
        46  #
        47  # For full reference documentation see the gnome help browser under
        48  # GNOME|System category.  You can also find the docs in HTML form on
        49  # http://www.gnome.org/projects/gdm/
        50  #
        51  # NOTE: Lines that begin with "#" are considered comments.
        52  #
        53  # Have fun!
        54
        55  [daemon]
        56  VTAllocation=false
        57  Greeter /usr/local/libexec/gdmlogin
        58
        59  [security]
        60
        61  [xdmcp]
        62  Enable=1
        63  HonorIndirect=1
        64  #Port=177
        65  [gui]
        66
        67  [greeter]
        68
        69  [chooser]
        70
        71  [debug]
        72  Enable=true
        73  # Note that to disable servers defined in the GDM System Defaults
        74  # configuration file (such as 0=Standard, you must put a line in this file
        75  # that says 0=inactive, as described in the Configuration section of the GDM
        76  # documentation.
        77  #
        78  [servers]
        79  0=VNC
        80  [server-VNC]
        81  name=VNC server
        82  command=/usr/local/bin/Xvnc -geometry 1024x768 -depth 24
        83  #securitytypes=none
        84  flexible=true
        85  # Also note, that if you redefine a [server-foo] section, then GDM will
        86  # use the definition in this file, not the GDM System Defaults configuration
        87  # file.  It is currently not possible to disable a [server-foo] section
        88  # defined in the GDM System Defaults configuration file.
        89  #
    
    /etc/passwd
    >
    # $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks 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
    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
    messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin
    polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin
    avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin
    gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin
    user:*:1001:0:User &:/home/user:/usr/local/bin/bash
    
    names
    >
    Irorjek
    Andrey
    Boris
    Sergey
    

    Статистика

    Время первой команды журнала15:58:12 2008- 7- 8
    Время последней команды журнала16:42:26 2008- 7- 8
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %19.80
    Процент синтаксически неверно набранных команд, % 2.97
    Суммарное время работы с терминалом *, час 0.74
    Количество командных строк в единицу времени, команда/мин 2.28
    Частота использования команд
    sed37|===================| 19.79%
    cat35|==================| 18.72%
    grep27|==============| 14.44%
    who20|==========| 10.70%
    echo14|=======| 7.49%
    &11|=====| 5.88%
    ^\7|===| 3.74%
    tr7|===| 3.74%
    awk5|==| 2.67%
    ifconfig4|==| 2.14%
    vim3|=| 1.60%
    w3|=| 1.60%
    ps2|=| 1.07%
    ~2|=| 1.07%
    /usr/local/etc/rc.d/gdm1|| 0.53%
    egrep1|| 0.53%
    '1|| 0.53%
    папа1|| 0.53%
    $FreeBSD:1|| 0.53%
    mail1|| 0.53%
    tail1|| 0.53%
    less1|| 0.53%
    cut1|| 0.53%
    Ñ1|| 0.53%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$