/l3/users/07-07-2008/fbsd-adm/fbsd1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 |
|
#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 |
#grep -v root /etc/passwd | grep root
|
#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 |
#grep -q root /etc/passwd
|
#grep -q root /etc/passwd ; echo $?
0 |
#grep -q sergey /etc/passwd ; echo $?
1 |
#grep -q sergey /etc/passwd && echo Yes\,\ this\ name\ is\ pre
|
#grep -q sergey /etc/passwd && echo "Yes, this name is
> |
#grep -q sergey /etc/passwd && echo "Yes, this name is present
|| echo "This name does`t present" > |
#grep -q sergey /etc/pass&& echo "Yes, this name is present" |
|
#cat /etc/pgrep -q sergey && echo "Yes, this name is present"
|
#cat /etc/passwd | grep -q sergey && echo "Yes, this name is p
esent" || echo "This name does\`t present This name does`t present |
#grep -q rooy /etc/passwd && echo "Yes, this name is present"
|
#grep -q root
Yes, this name is present |
#grep -q root /etc/passwd && echo "Yes, this name is
|
#grep -q root /etc/passwd && echo $?
0 |
#grep -q sergey /etc/passwd && echo $?
|
#grep -q sergey /etc/passwd ; echo $?
1 |
#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. # |
#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 # |
#grep -v "^\#|^\ *$"$? /usr/local/etc/gdm/gdm.conf
|
#grep -v "^\#|^\ *$"$?."This name
|
#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 # |
#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 |
#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 |
#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 # |
#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. |
#sed --help | less
|
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#cat /etc/passwd | sed s/[0-9,A-Z,a-z]//g
# $: //. . // :: $ # :*::: &:/://// :*:::- :/: :*::: :/:/// :*::: &:/:/// :*::: :/:/// :*::: :/:/// :*::: :/:/// :*::: -://:/// ... _:*::: ://:/// :*::: -:///:///// :*::: :/:/// :*::: :/:/// :*::: :/:/// :*:::- :/:// :*::: :/:// :*::: :/:// :*::: :/:// :*::: &://://// |
#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) |
#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) |
#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) |
#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) |
#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) |
#who | sed 1i\
> test string gsed: can't read string: No such file or directory |
#who | sed 1itest string
gsed: can't read string: No such file or directory |
#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) |
#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) |
#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) |
#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) |
#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) |
#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) |
#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) |
#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) |
#w | sed /root/ c\
> Nothing gsed: -e expression #1, char 6: missing command |
#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. |
#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 |
#vim name
|
#~
Igor Andrey Boris Sergey "names" 4 lines, 25 characters |
#~
|
#cat s
cat: s: No such file or directory |
#cat names
Igor Andrey Boris Sergey |
#sed -i -e s/Igor/Irorjek/
gsed: no input files |
#sed -i -e s/Igor/Irorjek/ names
|
#cat names
Irorjek Andrey Boris Sergey |
#sed -i -e s/Igor/Irorjek/ names
|
#echo `IP` | mail -s subject e@mail
|
#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 |
#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 |
#ifconfig re0 | grep inet
inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 |
#ifconfig re0 | grep inet | awk '{print$2}'
192.168.16.21 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#папа
bash: папа: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ |
#who | sed 1itest string
|
#Ñ
bash: Ñ: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ |
#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) |
#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) |
#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) |
#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) |
#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 |
#cat /etc/passwd | tr d[:punct:]
usage: tr [-Ccsu] string1 string2 tr [-Ccu] -d string1 tr [-Ccu] -s string1 tr [-Ccu] -ds string1 string2 |
#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 |
#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 |
#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 |
#cat /etc/passwd | tr -d [:punct:],[:digit:],[:upper:],[:lower
|
#cat /etc/passwd | tr -d '\n'
|
#cat /etc/passwd | tr -d '\nr
|
#vim tr
|
#$FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp
|
#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 |
#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 |
#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 |
#/usr/local/etc/rc.d/gdm restart
Stopping gdm. Waiting for PIDS: 55545, 55545, 55545, 55545, 55545. Starting gdm. |
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 #
# $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
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008