/l3/users/17-05-2010/nt-fbsdadm/fbsd3.net.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
$ls -l
total 0 -rw-r--r-- 1 user wheel 0 May 18 11:47 11:47:51 -rw-r--r-- 1 user wheel 0 May 18 11:47 18 -rw-r--r-- 1 user wheel 0 May 18 11:47 2010 -rw-r--r-- 1 user wheel 0 May 18 11:47 EEST -rw-r--r-- 1 user wheel 0 May 18 11:47 May -rw-r--r-- 1 user wheel 0 May 18 11:47 Tue -rw-r--r-- 1 user wheel 0 May 18 11:48 Tue May 18 11:48:12 EEST 2010 |
$sort
^C |
$vim names
--- /dev/null 2010-05-18 11:52:12.000000000 +0300 +++ names 2010-05-18 11:52:14.000000000 +0300 @@ -0,0 +1,3 @@ +Vitaliy +Sergey +Andrey |
$names < sort > sorted_names
bash: sort: No such file or directory |
$sort < names > sorted_names
|
$cat sorted_names
Andrey Sergey Vitaliy |
$man sort
|
$find ~ /root -name a*
/home/user/.gconf/desktop/gnome/accessibility /home/user/.gconf/apps /home/user/.gconf/apps/panel/applets /home/user/.gnome2/accels /home/user/.fontconfig/a046218b5fb18228765bf87355e87ca4-x86.cache-2 /home/user/.thumbnails/normal/a6a745c58219b5e34223a81b63254490.png /home/user/.thumbnails/normal/a4e6d0d296b00fb9741d155a6c17cb88.png /home/user/.thumbnails/normal/afb4bf3db3cb1f1004599f801ee4af7b.png /home/user/.config/xfce4/panel/actions-12.rc /home/user/.config/Thunar/accels.scm /home/user/.config/autostart find: /root/.ssh: Permission denied find: /root/.gconf: Permission denied find: /root/.gconfd: Permission denied find: /root/.gnome2: Permission denied find: /root/.gnome2_private: Permission denied find: /root/.nautilus/metafiles: Permission denied find: /root/.metacity: Permission denied find: /root/.config: Permission denied find: /root/.Trash: Permission denied find: /root/.thumbnails: Permission denied |
$find ~ /root -name a* 2>/tmp/errors
/home/user/.gconf/desktop/gnome/accessibility /home/user/.gconf/apps /home/user/.gconf/apps/panel/applets /home/user/.gnome2/accels /home/user/.fontconfig/a046218b5fb18228765bf87355e87ca4-x86.cache-2 /home/user/.thumbnails/normal/a6a745c58219b5e34223a81b63254490.png /home/user/.thumbnails/normal/a4e6d0d296b00fb9741d155a6c17cb88.png /home/user/.thumbnails/normal/afb4bf3db3cb1f1004599f801ee4af7b.png /home/user/.config/xfce4/panel/actions-12.rc /home/user/.config/Thunar/accels.scm /home/user/.config/autostart |
$cat /tmp/errors
find: /root/.ssh: Permission denied find: /root/.gconf: Permission denied find: /root/.gconfd: Permission denied find: /root/.gnome2: Permission denied find: /root/.gnome2_private: Permission denied find: /root/.nautilus/metafiles: Permission denied find: /root/.metacity: Permission denied find: /root/.config: Permission denied find: /root/.Trash: Permission denied find: /root/.thumbnails: Permission denied |
$find ~ /root -name a* 2>/tmp/errors 1>/tmp/results
|
$cat /tmp/errors
find: /root/.ssh: Permission denied find: /root/.gconf: Permission denied find: /root/.gconfd: Permission denied find: /root/.gnome2: Permission denied find: /root/.gnome2_private: Permission denied find: /root/.nautilus/metafiles: Permission denied find: /root/.metacity: Permission denied find: /root/.config: Permission denied find: /root/.Trash: Permission denied find: /root/.thumbnails: Permission denied |
$cat /tmp/res
resolv.conf resolv.conf.save results |
$cat /tmp/res
resolv.conf resolv.conf.save results |
$cat /tmp/results
/home/user/.gconf/desktop/gnome/accessibility /home/user/.gconf/apps /home/user/.gconf/apps/panel/applets /home/user/.gnome2/accels /home/user/.fontconfig/a046218b5fb18228765bf87355e87ca4-x86.cache-2 /home/user/.thumbnails/normal/a6a745c58219b5e34223a81b63254490.png /home/user/.thumbnails/normal/a4e6d0d296b00fb9741d155a6c17cb88.png /home/user/.thumbnails/normal/afb4bf3db3cb1f1004599f801ee4af7b.png /home/user/.config/xfce4/panel/actions-12.rc /home/user/.config/Thunar/accels.scm /home/user/.config/autostart |
$find ~ /root -name a* 2>/tmp/errors 1>/tmp/results
|
$#sort < names > names
|
$cat names
Vitaliy Sergey Andrey |
$sort < names > names
|
$cat names
|
$sort < names >> names
|
$cat names
|
$cat
a a ^C |
$cat | grep b
a ab ab ^C |
$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
# $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 | cud -d : -f 1
bash: cud: command not found |
$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 | awk '{print$1}'
# # root:*:0:0:Charlie toor:*:0:0:Bourne-again daemon:*:1:1:Owner operator:*:2:5:System bin:*:3:7:Binaries tty:*:4:65533:Tty kmem:*:5:65533:KMem games:*:7:13:Games ... _dhcp:*:65:65:dhcp uucp:*:66:66:UUCP pop:*:68:6:Post www:*:80:80:World nobody:*:65534:65534:Unprivileged messagebus:*:556:556:D-BUS polkit:*:562:562:PolicyKit avahi:*:558:558:Avahi gdm:*:92:92:GNOME user:*:1001:0:User |
$cat /etc/passwd | awk -F : '{print$1" Has home directory: "$5}'
# $FreeBSD Has home directory: # Has home directory: root Has home directory: Charlie & toor Has home directory: Bourne-again Superuser daemon Has home directory: Owner of many system processes operator Has home directory: System & bin Has home directory: Binaries Commands and Source tty Has home directory: Tty Sandbox kmem Has home directory: KMem Sandbox games Has home directory: Games pseudo-user ... _dhcp Has home directory: dhcp programs uucp Has home directory: UUCP pseudo-user pop Has home directory: Post Office Owner www Has home directory: World Wide Web Owner nobody Has home directory: Unprivileged user messagebus Has home directory: D-BUS Daemon User polkit Has home directory: PolicyKit Daemon User avahi Has home directory: Avahi Daemon User gdm Has home directory: GNOME Display Manager user Has home directory: User & |
$cat /etc/passwd | awk -F : '{print$1" Has home directory: "$6}'
# $FreeBSD Has home directory: # Has home directory: root Has home directory: /root toor Has home directory: /root daemon Has home directory: /root operator Has home directory: / bin Has home directory: / tty Has home directory: / kmem Has home directory: / games Has home directory: /usr/games ... _dhcp Has home directory: /var/empty uucp Has home directory: /var/spool/uucppublic pop Has home directory: /nonexistent www Has home directory: /nonexistent nobody Has home directory: /nonexistent messagebus Has home directory: /nonexistent polkit Has home directory: /nonexistent avahi Has home directory: /nonexistent gdm Has home directory: /nonexistent user Has home directory: /home/user |
$cat /etc/passwd | awk -F : '{print$1" Has home directory: "$6}'
|
$cat /etc/passwd | head
# $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 |
$cat /etc/passwd | head | cat -n
1 # $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $ 2 # 3 root:*:0:0:Charlie &:/root:/usr/local/bin/bash 4 toor:*:0:0:Bourne-again Superuser:/root: 5 daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin 6 operator:*:2:5:System &:/:/usr/sbin/nologin 7 bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin 8 tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin 9 kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin 10 games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin |
$cat /etc/passwd | head -20 | cat -n
1 # $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $ 2 # 3 root:*:0:0:Charlie &:/root:/usr/local/bin/bash 4 toor:*:0:0:Bourne-again Superuser:/root: 5 daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin 6 operator:*:2:5:System &:/:/usr/sbin/nologin 7 bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin 8 tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin 9 kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin 10 games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin 11 news:*:8:8:News Subsystem:/:/usr/sbin/nologin 12 man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin 13 sshd:*:22:22:Secure Shell Daemon:/var/empty:/usr/sbin/nologin 14 smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin 15 mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin 16 bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin 17 proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin 18 _pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin 19 _dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin 20 uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico |
$cat /etc/passwd | tail | cat -n
1 _dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin 2 uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico 3 pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin 4 www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin 5 nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin 6 messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin 7 polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin 8 avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin 9 gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin 10 user:*:1001:0:User &:/home/user:/usr/local/bin/bash |
$cat /etc/passwd | tail -40 | cat -n
1 # $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $ 2 # 3 root:*:0:0:Charlie &:/root:/usr/local/bin/bash 4 toor:*:0:0:Bourne-again Superuser:/root: 5 daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin 6 operator:*:2:5:System &:/:/usr/sbin/nologin 7 bin:*:3:7:Binaries Commands and Source:/:/usr/sbin/nologin 8 tty:*:4:65533:Tty Sandbox:/:/usr/sbin/nologin 9 kmem:*:5:65533:KMem Sandbox:/:/usr/sbin/nologin 10 games:*:7:13:Games pseudo-user:/usr/games:/usr/sbin/nologin ... 19 _dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin 20 uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico 21 pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin 22 www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin 23 nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin 24 messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin 25 polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin 26 avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin 27 gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin 28 user:*:1001:0:User &:/home/user:/usr/local/bin/bash |
$cat /etc/passwd | tail -15 | cat -n
1 smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin 2 mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin 3 bind:*:53:53:Bind Sandbox:/:/usr/sbin/nologin 4 proxy:*:62:62:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin 5 _pflogd:*:64:64:pflogd privsep user:/var/empty:/usr/sbin/nologin 6 _dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin 7 uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico 8 pop:*:68:6:Post Office Owner:/nonexistent:/usr/sbin/nologin 9 www:*:80:80:World Wide Web Owner:/nonexistent:/usr/sbin/nologin 10 nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin 11 messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin 12 polkit:*:562:562:PolicyKit Daemon User:/nonexistent:/sbin/nologin 13 avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin 14 gdm:*:92:92:GNOME Display Manager:/nonexistent:/sbin/nologin 15 user:*:1001:0:User &:/home/user:/usr/local/bin/bash |
$sudo tail -f /var/log/auth.log
Password: sudo: pam_authenticate: conversation failure |
$sudo tail -f /var/log/auth.log &
[1] 19860 [1]+ Stopped sudo tail -f /var/log/auth.log |
$sudo tail -f /var/log/auth.log
Password: May 18 10:26:01 fbsd3 sshd[9662]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 53881 ssh2 May 18 10:42:30 fbsd3 sshd[9672]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 10:42:35 fbsd3 sshd[10029]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 52399 ssh2 May 18 10:42:58 fbsd3 sshd[10032]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 10:43:02 fbsd3 sshd[10109]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 52400 ssh2 May 18 11:27:43 fbsd3 sshd[10119]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 11:27:48 fbsd3 sshd[11470]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 47656 ssh2 May 18 11:28:18 fbsd3 sshd[11473]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 11:28:22 fbsd3 sshd[11552]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 47657 ssh2 May 18 11:29:07 fbsd3 su: user to root on /dev/ttyp2 ^Z [2]+ Stopped sudo tail -f /var/log/auth.log |
$bg
[2]+ sudo tail -f /var/log/auth.log & |
$fg
sudo tail -f /var/log/auth.log Password: May 18 10:26:01 fbsd3 sshd[9662]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 53881 ssh2 May 18 10:42:30 fbsd3 sshd[9672]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 10:42:35 fbsd3 sshd[10029]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 52399 ssh2 May 18 10:42:58 fbsd3 sshd[10032]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 10:43:02 fbsd3 sshd[10109]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 52400 ssh2 May 18 11:27:43 fbsd3 sshd[10119]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 11:27:48 fbsd3 sshd[11470]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 47656 ssh2 May 18 11:28:18 fbsd3 sshd[11473]: Received disconnect from 192.168.16.4: 11: disconnected by user May 18 11:28:22 fbsd3 sshd[11552]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 47657 ssh2 May 18 11:29:07 fbsd3 su: user to root on /dev/ttyp2 May 18 12:07:34 fbsd3 sshd[19883]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 42028 ssh2 May 18 12:07:34 fbsd3 sshd[19883]: Accepted keyboard-interactive/pam for user from 192.168.16.4 port 42028 ssh2 ^Z [1]+ Stopped sudo tail -f /var/log/auth.log |
$fg
sudo tail -f /var/log/auth.log ^Z [1]+ Stopped sudo tail -f /var/log/auth.log |
$bg
[1]+ sudo tail -f /var/log/auth.log & |
$May 18 12:09:06 fbsd3 sshd[19886]: Received disconnect from 192.168.16.4: 11: disconnected by user
May 18 12:09:06 fbsd3 sshd[19886]: Received disconnect from 192.168.16.4: 11: disconnected by user |
$jpbs
bash: jpbs: command not found |
$jobs
[1]- Running sudo tail -f /var/log/auth.log & [2]+ Running sudo tail -f /var/log/auth.log & |
$fg
sudo tail -f /var/log/auth.log ^C |
$fg
sudo tail -f /var/log/auth.log ^C |
$jobs
|
$vim names
--- /tmp/l3-saved-11599.29017.20289 2010-05-18 12:09:48.000000000 +0300 +++ names 2010-05-18 12:10:09.000000000 +0300 @@ -0,0 +1,3 @@ +Vitaliy +Sergey +Andrey |
$cat names
Vitaliy Sergey Andrey |
$cat names | sort
Andrey Sergey Vitaliy |
$cat names | sort | tr -d [:lower:] [:upper:]
usage: tr [-Ccsu] string1 string2 tr [-Ccu] -d string1 tr [-Ccu] -s string1 tr [-Ccu] -ds string1 string2 |
$cat names | sort | tr -c [:lower:] [:upper:]
|
$cat names | sort | sed 's/[:lower:]/[:upper:]/g'
And[:upper:][:upper:]y S[:upper:][:upper:]g[:upper:]y Vita[:upper:]iy |
$cat names | sort | sed 's/[:lower:]/[:upper:]/'
And[:upper:]ey S[:upper:]rgey Vita[:upper:]iy |
$man tr
|
$cat names | sort | tee > /tmp/tee | tr [:lower:] [:upper:]
|
$cat names | sort | tee /tmp/tee | tr [:lower:] [:upper:]
ANDREY SERGEY VITALIY |
$cat /tmp/tee
Andrey Sergey Vitaliy |
$cat names | sort | echo > /tmp/tee | tr [:lower:] [:upper:]
|
$cat /tmp/tee
|
$cat names | sort | tee /tmp/tee | tr [:lower:] [:upper:]
ANDREY SERGEY VITALIY |
$cat /tmp/tee
Andrey Sergey Vitaliy |
$cat names | sort | tee /tmp/tee | tr [:lower:] [:upper:]
ANDREY SERGEY VITALIY |
$ls
11:47:51 Tue 18 Tue May 18 11:48:12 EEST 2010 2010 names EEST sorted_names May |
$touch -1
touch: illegal option -- 1 usage: touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ... |
$touch \-1
touch: illegal option -- 1 usage: touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ... |
$touch "-1"
touch: illegal option -- 1 usage: touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ... |
$touch -- -1
|
$ls
-1 May 11:47:51 Tue 18 Tue May 18 11:48:12 EEST 2010 2010 names EEST sorted_names |
$touch ./-bbb
|
$ls
-1 May -bbb Tue 11:47:51 Tue May 18 11:48:12 EEST 2010 18 names 2010 sorted_names EEST |
$w
4:08PM up 17:14, 2 users, load averages: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE WHAT user p1 debian4 11:28AM - script -t 0 -q /home/u user p3 debian4 4:08PM - script -t 0 -q /home/u |
$ps aux | grep free
user 22903 0.0 0.1 1600 1024 p4 S+ 4:08PM 0:00.00 grep free |
$ps aux | grep bash
|
$ps aux | grep script
user 11557 0.0 0.1 1348 936 p1 Ss+ 11:28AM 0:00.67 script -t 0 -q /h user 22810 0.0 0.1 1348 936 p3 Ss+ 4:08PM 0:00.03 script -t 0 -q /h user 22921 0.0 0.1 1600 1024 p4 S+ 4:08PM 0:00.00 grep script |
$kill -9 11557
|
$find /usr/share/doc/ -name *.txt
/usr/share/doc/de_DE.ISO8859-1/books/porters-handbook/book.txt /usr/share/doc/el_GR.ISO8859-7/articles/cvs-freebsd/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/dialup-firewall/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/explaining-bsd/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/formatting-media/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/freebsd-questions/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/greek-language-support/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/laptop/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/multi-os/article.txt /usr/share/doc/el_GR.ISO8859-7/articles/new-users/article.txt ... /usr/share/doc/zh_TW.Big5/articles/hubs/article.txt /usr/share/doc/zh_TW.Big5/articles/mailing-list-faq/article.txt /usr/share/doc/zh_TW.Big5/articles/nanobsd/article.txt /usr/share/doc/zh_TW.Big5/articles/pr-guidelines/article.txt /usr/share/doc/zh_TW.Big5/articles/problem-reports/article.txt /usr/share/doc/zh_TW.Big5/books/developers-handbook/book.txt /usr/share/doc/zh_TW.Big5/books/faq/book.txt /usr/share/doc/zh_TW.Big5/books/fdp-primer/book.txt /usr/share/doc/zh_TW.Big5/books/handbook/book.txt /usr/share/doc/zh_TW.Big5/books/porters-handbook/book.txt |
$find /usr/share/doc/ -name *.txt -exec frep -il microsoft
find: -exec: no terminating ";" or "+" |
$find /usr/share/doc/ -name *.txt -exec frep -il microsoft {} \;
find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory ... find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: frep: No such file or directory find: ^C |
$find /usr/share/doc/ -name *.txt -exec fg
/usr/share/doc/en_US.ISO8859-1/articles/bsdl-gpl/article.txt /usr/share/doc/en_US.ISO8859-1/articles/console-server/article.txt /usr/share/doc/en_US.ISO8859-1/articles/contributors/article.txt /usr/share/doc/en_US.ISO8859-1/articles/diskless-x/article.txt /usr/share/doc/en_US.ISO8859-1/articles/fonts/article.txt /usr/share/doc/en_US.ISO8859-1/articles/freebsd-questions/article.txt /usr/share/doc/en_US.ISO8859-1/articles/laptop/article.txt /usr/share/doc/en_US.ISO8859-1/articles/mailing-list-faq/article.txt /usr/share/doc/en_US.ISO8859-1/articles/multi-os/article.txt /usr/share/doc/en_US.ISO8859-1/articles/new-users/article.txt ... /usr/share/doc/ru_RU.KOI8-R/books/ppp-primer/book.txt /usr/share/doc/zh_CN.GB2312/books/arch-handbook/book.txt /usr/share/doc/zh_CN.GB2312/books/handbook/book.txt /usr/share/doc/zh_CN.GB2312/books/porters-handbook/book.txt /usr/share/doc/zh_TW.Big5/articles/freebsd-questions/article.txt /usr/share/doc/zh_TW.Big5/articles/mailing-list-faq/article.txt /usr/share/doc/zh_TW.Big5/books/developers-handbook/book.txt /usr/share/doc/zh_TW.Big5/books/faq/book.txt /usr/share/doc/zh_TW.Big5/books/handbook/book.txt /usr/share/doc/zh_TW.Big5/books/porters-handbook/book.txt |
$fgrep -vil freebsd
/usr/share/doc/en_US.ISO8859-1/articles/bsdl-gpl/article.txt /usr/share/doc/en_US.ISO8859-1/articles/console-server/article.txt /usr/share/doc/en_US.ISO8859-1/articles/contributors/article.txt /usr/share/doc/en_US.ISO8859-1/articles/diskless-x/article.txt /usr/share/doc/en_US.ISO8859-1/articles/fonts/article.txt /usr/share/doc/en_US.ISO8859-1/articles/freebsd-questions/article.txt /usr/share/doc/en_US.ISO8859-1/articles/laptop/article.txt /usr/share/doc/en_US.ISO8859-1/articles/mailing-list-faq/article.txt /usr/share/doc/en_US.ISO8859-1/articles/multi-os/article.txt /usr/share/doc/en_US.ISO8859-1/articles/new-users/article.txt ... /usr/share/doc/ru_RU.KOI8-R/books/ppp-primer/book.txt /usr/share/doc/zh_CN.GB2312/books/arch-handbook/book.txt /usr/share/doc/zh_CN.GB2312/books/handbook/book.txt /usr/share/doc/zh_CN.GB2312/books/porters-handbook/book.txt /usr/share/doc/zh_TW.Big5/articles/freebsd-questions/article.txt /usr/share/doc/zh_TW.Big5/articles/mailing-list-faq/article.txt /usr/share/doc/zh_TW.Big5/books/developers-handbook/book.txt /usr/share/doc/zh_TW.Big5/books/faq/book.txt /usr/share/doc/zh_TW.Big5/books/handbook/book.txt /usr/share/doc/zh_TW.Big5/books/porters-handbook/book.txt |
$grep -i /usr/share/doc/zh_TW.Big5/books/handbook/book.txt
|
$grep -i freebsd
Updated for FreeBSD 5.X by Joel Dahl. Note: NOTES does not exist in FreeBSD 4.X. Instead, see the LINT In FreeBSD 5.X and later versions you can still generate a Support for I386_CPU is still provided in the source of FreeBSD, means that to install FreeBSD with a 386-class cpu, you now have * Install an older FreeBSD release and rebuild from source as * Roll your own release of FreeBSD which includes I386_CPU In FreeBSD 5.X and newer versions the device.hints(5) is used to The normal build process of FreeBSD does not include debugging branch or develop changes of your own for the FreeBSD kernel, you ... there, let them know you would like a native FreeBSD version of steps apply !S:glue!" to connect it to your FreeBSD system. under FreeBSD: Oracle 8.0.5.1 Enterprise Edition for Linux onto a FreeBSD run Oracle for Linux on FreeBSD, not what has been described in maximum size of shared memory. Do not use SHMMAX under FreeBSD. Installations of SAP Systems using FreeBSD will not be supported System with Oracle Database for Linux onto a FreeBSD machine, including the installation of FreeBSD and Oracle. Two different * SAP R/3 4.6B (IDES) with Oracle 8.0.5 on FreeBSD 4.3-STABLE |
$cd /tmp
|
$ls
1 motd 123 netconfig aliases netstart amd.map network.subr apmd.conf networks auth.conf newsyslog.conf crontab nsswitch.conf csh.cshrc opiekeys csh.login passwd csh.logout pccard_ether ... locate.rc shells login.access snmpd.config login.conf sysctl.conf login.conf.db syslog.conf mac.conf tee mail.rc termcap make.conf ttys manpath.config usbd.conf manpath.config.bak wall_cmos_clock manpath.config.bak.xorg |
$cd 1
1/ 123 |
$cd 1
|
$vim file
--- /dev/null 2010-05-18 16:13:30.000000000 +0300 +++ file 2010-05-18 16:13:30.000000000 +0300 @@ -0,0 +1 @@ +Microsoft |
$vim file2
--- /dev/null 2010-05-18 16:13:31.000000000 +0300 +++ file2 2010-05-18 16:13:38.000000000 +0300 @@ -0,0 +1,2 @@ +microsoft +freebsd |
$fgrep -vil freebsd `find /tmp/1/ ! -type d
^C |
# $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
find: /root/.ssh: Permission denied find: /root/.gconf: Permission denied find: /root/.gconfd: Permission denied find: /root/.gnome2: Permission denied find: /root/.gnome2_private: Permission denied find: /root/.nautilus/metafiles: Permission denied find: /root/.metacity: Permission denied find: /root/.config: Permission denied find: /root/.Trash: Permission denied find: /root/.thumbnails: Permission denied
resolv.conf resolv.conf.save results
/home/user/.gconf/desktop/gnome/accessibility /home/user/.gconf/apps /home/user/.gconf/apps/panel/applets /home/user/.gnome2/accels /home/user/.fontconfig/a046218b5fb18228765bf87355e87ca4-x86.cache-2 /home/user/.thumbnails/normal/a6a745c58219b5e34223a81b63254490.png /home/user/.thumbnails/normal/a4e6d0d296b00fb9741d155a6c17cb88.png /home/user/.thumbnails/normal/afb4bf3db3cb1f1004599f801ee4af7b.png /home/user/.config/xfce4/panel/actions-12.rc /home/user/.config/Thunar/accels.scm /home/user/.config/autostart
Andrey Sergey Vitaliy
Vitaliy Sergey Andrey
Andrey Sergey Vitaliy
Время первой команды журнала | 10:47:55 2010- 5-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:13:38 2010- 5-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 19.80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.85 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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