/l3/users/17-05-2010/nt-ladm/debian4.net.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
$ssh 192.168.16.211 -l root
![]() root@192.168.16.211's password: Last login: Thu May 20 17:48:35 2010 Linux debian1 2.6.18-6-686 #1 SMP Sat Dec 27 09:31:05 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. debian1:~# ls -l /usr/src/ итого 66124 ... debian1:/usr/src/linux-2.6.34# Write failed: Broken pipe title Debian GNU/Linux, kernel 2.6.18-6-686 root (hd0,0) kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro vga=792 initrd /boot/initrd.img-2.6.18-6-686 savedefault title Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode) root (hd0,0) kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro single initrd /boot/initrd.img-2.6.18-6-686 |
$ls -l /lib/modules/
итого 4 drwxr-xr-x 3 root root 4096 Апр 12 21:56 2.6.26-2-xen-686 |
$modinfo 3c59x
![]() l3script: modinfo: команда не найдена |
$sudo modinfo 3c59x
[sudo] password for user: filename: /lib/modules/2.6.26-2-xen-686/kernel/drivers/net/3c59x.ko license: GPL description: 3Com 3c59x/3c9xx ethernet driver author: Donald Becker <becker@scyld.com> alias: pci:v000010B7d00009210sv*sd*bc*sc*i* alias: pci:v000010B7d00009056sv*sd*bc*sc*i* alias: pci:v000010B7d00001202sv*sd*bc*sc*i* alias: pci:v000010B7d00001201sv*sd*bc*sc*i* alias: pci:v000010B7d00009201sv*sd*bc*sc*i* ... parm: enable_wol:3c59x: Turn on Wake-on-LAN for adapter(s) (0-1) (array of int) parm: global_enable_wol:3c59x: same as enable_wol, but applies to all NICs if enable_wol is unset (int) parm: rx_copybreak:3c59x copy breakpoint for copy-only-tiny-frames (int) parm: max_interrupt_work:3c59x maximum events handled per interrupt (int) parm: compaq_ioaddr:3c59x PCI I/O base address (Compaq BIOS problem workaround) (int) parm: compaq_irq:3c59x PCI IRQ number (Compaq BIOS problem workaround) (int) parm: compaq_device_id:3c59x PCI device ID (Compaq BIOS problem workaround) (int) parm: watchdog:3c59x transmit timeout in milliseconds (int) parm: global_use_mmio:3c59x: same as use_mmio, but applies to all NICs if options is unset (int) parm: use_mmio:3c59x: use memory-mapped PCI I/O resource (0-1) (array of int) |
$sudo modinfo 3c59x | less
|
$lsmod
Module Size Used by ipv6 236644 14 fuse 44860 1 ext3 106664 1 jbd 43092 1 ext3 mbcache 8260 1 ext3 thermal_sys 11624 0 |
$sudo modinfo jbd | less
|
$sudo modinfo jbd | less
|
$sudo modinfo mbcache | less
|
$sudo modinfo 3c59x | head -1 | awk '{print $2}'
/lib/modules/2.6.26-2-xen-686/kernel/drivers/net/3c59x.ko |
$dmesg | tail
[247902.482945] evince[6211]: segfault at 10 ip 08061c30 sp bfffde70 error 4 in evince[8048000+4f000] [247927.802881] evince[6226]: segfault at 10 ip 08061c30 sp bfffe6a0 error 4 in evince[8048000+4f000] [247940.639214] evince[6228]: segfault at 10 ip 08061c30 sp bfffd160 error 4 in evince[8048000+4f000] [335250.938466] evince[12621]: segfault at 10 ip 08061c30 sp bfffd650 error 4 in evince[8048000+4f000] [505555.093749] clocksource/0: Time went backwards: ret=9cf68a12e860c delta=-18379638 shadow=9cf689d208ede offset=5267d8b [567472.871979] 3c59x: Unknown symbol mii_ethtool_sset [567472.872189] 3c59x: Unknown symbol mii_check_media [567472.872387] 3c59x: Unknown symbol mii_nway_restart [567472.872573] 3c59x: Unknown symbol generic_mii_ioctl [567472.872643] 3c59x: Unknown symbol mii_ethtool_gset |
$lsmod
Module Size Used by ipv6 236644 14 fuse 44860 1 ext3 106664 1 jbd 43092 1 ext3 mbcache 8260 1 ext3 thermal_sys 11624 0 |
$modinfo mii | head -1
sudo insmod `sudo modinfo 3c59x | head -1 | awk '{print $2}'` |
$ls mod
![]() ls: невозможно получить доступ к mod: Нет такого файла или каталога |
$lsmod
Module Size Used by 3c59x 36840 0 mii 5664 1 3c59x ipv6 236644 14 fuse 44860 1 ext3 106664 1 jbd 43092 1 ext3 mbcache 8260 1 ext3 thermal_sys 11624 0 |
$lsmod -h
![]() Usage: lsmod |
$sudo modprobe -r 3c59x
|
$sudo /etc/crontab
![]() [sudo] password for user: sudo: /etc/crontab: command not found |
$sudo vim /etc/crontab
|
$ 18
|
$~
|
$sudo vim /etc/crontab
|
$date
Fri May 21 11:10:29 EEST 2010 |
$sudo vim /etc/crontab
|
$crontab -e
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "crontab.kdQuuG/crontab" 2L, 68C written crontab: installing new crontab |
$su -
Password: l3-agent is already running: pid=1155; pidfile=/root/.lilalo/l3-agent.pid root@debian4:~# l3script |
#grep -r logger /var/spool/cron/
/var/spool/cron/crontabs/user:* * * * * logger -p emerg USER_CRONTAB |
#vim /var/spool/cron/crontabs/user
|
#~
|
#vim /etc/cron
![]() |
#vim /etc/cron.deny
![]() |
#~
![]() ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/cron.deny" [Новый] 0L, 0C записано |
#vim /etc/cron.deny
|
#~
|
#vim /etc/cron.deny
|
#exit
exit root@debian4:~# exit logout |
$crontab -e
![]() You (user) are not allowed to use this program (crontab) See crontab(1) for more information |
$sudo vim /etc/cron.allow
|
$crontab -e
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ No modification made |
$apropos syslog
logger (1) - a shell command interface to the syslog(3) system log ... rsyslog.conf (5) - rsyslogd(8) configuration file rsyslogd (8) - reliable and extended syslogd syslog (2) - read and/or clear kernel message ring buffer; set cons... syslog (3) - send messages to the system logger vsyslog (3) - send messages to the system logger |
$vim /etc/rsyslog.conf
|
$less /var/log/auth.log
![]() |
$sudo less /var/log/auth.log
|
$vim /etc/ssh/sshd_config
|
$ 61 lpr.* -/var/log/lpr.log
11 HostKey /etc/ssh/ssh_host_rsa_key 12 HostKey /etc/ssh/ssh_host_dsa_key 13 #Privilege Separation is turned on for security 14 UsePrivilegeSeparation yes 15 c/ssh/sshd_config" [readonly] 86L, 2453C 16 # Lifetime and size of ephemeral version 1 server key 17 KeyRegenerationInterval 3600 18 ServerKeyBits 768 19 20 # Logging 21 SyslogFacility AUTH |
$ 22 LogLevel INFO
![]() logcheck/ login.defs logrotate.conf logrotate.d/ |
$vim /etc/logrotate.conf
|
$vim /etc/logrotate.d/dpkg
|
$~ {
![]() logrotate 3.7.8 - Copyright (C) 1995-2001 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License Usage: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command] [-s|--state=statefile] [-v|--verbose] [-?|--help] [--usage] [OPTION...] <configfile> |
$sudo logrotate -f /etc/logrotate.conf
|
$ls -l /var/log/
total 1148 drwxr-xr-x 2 root root 4096 May 21 11:58 ConsoleKit drwxr-xr-x 2 root root 4096 May 21 11:58 apt -rw-r----- 1 root adm 0 May 21 11:58 auth.log -rw-r----- 1 root adm 106380 May 21 11:58 auth.log.1 -rw-r----- 1 root adm 1639 May 16 09:25 auth.log.2.gz -rw-r----- 1 root adm 31 Apr 13 00:43 boot -rw-r--r-- 1 root root 290990 Apr 13 00:43 bootstrap.log -rw-rw---- 1 root utmp 0 May 21 11:58 btmp -rw-rw---- 1 root utmp 1536 May 18 12:59 btmp.1 ... -rw-r----- 1 root adm 452 May 20 09:25 syslog.3.gz -rw-r----- 1 root adm 635 May 19 09:25 syslog.4.gz -rw-r----- 1 root adm 598 May 18 09:25 syslog.5.gz -rw-r----- 1 root adm 442 May 17 09:25 syslog.6.gz -rw-r----- 1 root adm 8372 May 16 09:25 syslog.7.gz -rw-r----- 1 root adm 0 May 21 11:58 user.log -rw-r----- 1 root adm 207 May 21 11:16 user.log.1 -rw-r----- 1 root adm 84 Apr 13 01:18 user.log.2.gz -rw-rw-r-- 1 root utmp 0 May 21 11:58 wtmp -rw-rw-r-- 1 root utmp 86400 May 21 10:53 wtmp.1 |
$sudo dpkg -l
[sudo] password for user: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii adduser 3.112 add and remove users and groups ii alacarte 0.12.4-2 easy GNOME menu editing tool ii app-install-da 2010.01.31 Application Installer Data Files ii apt 0.7.25.3 Advanced front-end for dpkg ... ii xserver-xorg-v 1:0.2.0-4 X.Org X server -- Video 4 Linux display driv ii xserver-xorg-v 1:2.3.0-1 X.Org X server -- VESA display driver ii xserver-xorg-v 1:10.16.9-1 X.Org X server -- VMware display driver ii xserver-xorg-v 1:1.2.3-1 X.Org X server -- Voodoo display driver ii xsltproc 1.1.26-2 XSLT command line processor ii xterm 256-1 X terminal emulator ii xulrunner-1.9. 1.9.1.9-7 XUL + XPCOM application runner ii yelp 2.28.0+webkit- Help browser for GNOME ii zenity 2.28.0-2 Display graphical dialog boxes from shell sc ii zlib1g 1:1.2.3.4.dfsg compression library - runtime |
$sudo dpkg -l | grep xorg
ii xserver-xorg 1:7.5+5 the X.Org X server ii xserver-xorg-core 2:1.7.6-1 Xorg X server - core server ii xserver-xorg-input-all 1:7.5+5 the X.Org X server -- input driver metapacka ii xserver-xorg-input-evdev 1:2.3.2-4 X.Org X server -- evdev input driver ii xserver-xorg-input-synaptics 1.2.1-1 Synaptics TouchPad driver for X.Org server ii xserver-xorg-input-wacom 0.10.3+20100109-1 X.Org X server -- Wacom input driver ii xserver-xorg-video-all 1:7.5+5 the X.Org X server -- output driver metapack ii xserver-xorg-video-apm 1:1.2.2-1 X.Org X server -- APM display driver ii xserver-xorg-video-ark 1:0.7.2-1 X.Org X server -- ark display driver ii xserver-xorg-video-ati 1:6.12.6-1 X.Org X server -- ATI display driver wrapper ... ii xserver-xorg-video-siliconmotion 1:1.7.3-1 X.Org X server -- SiliconMotion display driv ii xserver-xorg-video-sis 1:0.10.2-2 X.Org X server -- SiS display driver ii xserver-xorg-video-sisusb 1:0.9.3-1 X.Org X server -- SiS USB display driver ii xserver-xorg-video-tdfx 1:1.4.3-1 X.Org X server -- tdfx display driver ii xserver-xorg-video-trident 1:1.3.3-1 X.Org X server -- Trident display driver ii xserver-xorg-video-tseng 1:1.2.3-1 X.Org X server -- Tseng display driver ii xserver-xorg-video-v4l 1:0.2.0-4 X.Org X server -- Video 4 Linux display driv ii xserver-xorg-video-vesa 1:2.3.0-1 X.Org X server -- VESA display driver ii xserver-xorg-video-vmware 1:10.16.9-1 X.Org X server -- VMware display driver ii xserver-xorg-video-voodoo 1:1.2.3-1 X.Org X server -- Voodoo display driver |
$dpkg -L console-cyrillyc
![]() Package `console-cyrillyc' is not installed. Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. |
$dpkg -L console-cyrilyc
![]() Package `console-cyrilyc' is not installed. Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. |
$dpkg -L console-cyrilic
![]() Package `console-cyrilic' is not installed. Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. |
$. /etc/bash_completion
|
$sudo dpkg -L console-common
/. /etc /etc/console /etc/init.d /etc/init.d/keymap.sh /usr /usr/sbin /usr/sbin/install-keymap /usr/bin /usr/bin/kbd-config ... /usr/share/doc/console-common/TODO /usr/share/console /usr/share/console/ps2-to-riscpc /usr/share/console/lists /usr/share/console/lists/keymaps /usr/share/console/getkmapchoice.pl /usr/share/man /usr/share/man/man8 /usr/share/man/man8/kbd-config.8.gz /usr/share/man/man8/install-keymap.8.gz |
$dokg -S /etc/fstab
![]() l3script: dokg: command not found |
$dpkg -S /etc/fstab
![]() dpkg: /etc/fstab not found. |
$dpkg -S /etc/
![]() Display all 161 possibilities? (y or n) |
$dpkg -S /bin/
![]() Display all 112 possibilities? (y or n) bash dumpkeys mktemp sh bunzip2 echo more sh.distrib bzcat ed mount sleep bzcmp egrep mountpoint stty bzdiff false mt su bzegrep fgconsole mt-gnu sync bzexe fgrep mv tailf bzfgrep fuser nano tar bzgrep grep nc tempfile ... cp lessfile ps zcat cpio lesskey pwd zcmp dash lesspipe rbash zdiff date ln readlink zegrep dd loadkeys rm zfgrep df login rmdir zforce dir ls rnano zgrep dmesg lsmod run-parts zless dnsdomainname mkdir sed zmore domainname mknod setfont znew |
$dpkg -S /bin/ip
iproute: /bin/ip |
$dpkg -S /sbin/iptables
iptables: /sbin/iptables |
$cat /etc/apt/sources.list
deb http://10.0.35.1:9999/debian squeeze main contrib non-free #deb http://debian.org.ua/debian squeeze main contrib non-free deb http://security.debian.org/ testing/updates main |
$sudo apt-get update
Get:1 http://10.0.35.1 squeeze Release.gpg [835B] Hit http://security.debian.org testing/updates Release.gpg Hit http://security.debian.org testing/updates Release Get:2 http://10.0.35.1 squeeze Release [89.5kB] Ign http://security.debian.org testing/updates/main Packages/DiffIndex Hit http://security.debian.org testing/updates/main Packages Get:3 http://10.0.35.1 squeeze/main Packages/DiffIndex [2038B] Get:4 http://10.0.35.1 squeeze/contrib Packages/DiffIndex [2023B] Get:5 http://10.0.35.1 squeeze/non-free Packages/DiffIndex [2023B] Get:6 http://10.0.35.1 squeeze/main 2010-05-18-1548.42.pdiff [1420B] ... Get:28 http://10.0.35.1 squeeze/main 2010-05-20-0306.43.pdiff [16.7kB] Get:29 http://10.0.35.1 squeeze/main 2010-05-20-0306.43.pdiff [16.7kB] Get:30 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B] Get:31 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B] Get:32 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B] Get:33 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB] Get:34 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB] Get:35 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB] Fetched 159kB in 21s (7330B/s) Reading package lists... Done |
$apt-cache search popa3d
popa3d - A tiny POP3 daemon, designed with security as the primary goal |
$apt-cache show popa3d
Package: popa3d Priority: extra Section: mail Installed-Size: 152 Maintainer: Krzysztof Krzyżaniak (eloy) <eloy@debian.org> Architecture: i386 Version: 1.0.2-6 Provides: pop3-server Depends: libc6 (>= 2.0), libpam0g (>= 0.99.7.1) Pre-Depends: debconf (>= 1.2.9) | debconf-2.0, adduser, update-inetd ... SHA1: ac3e9362736f699df51fbbc2d8644aad8bc470b6 SHA256: 7a082af671975a9fd1783e5ce208426a02ed7a789475a45b3d69b9ab87d2e5e5 Description: A tiny POP3 daemon, designed with security as the primary goal popa3d is fast, small and secure pop3 daemon. It's written from scratch by Solar Designer for Owl (Openwall GNU/*/Linux). . Popa3d can work both in standalone or inetd mode. . For more information see DESIGN file. Tag: interface::daemon, mail::pop, network::server, protocol::pop3, role::program, security::authentication, works-with::mail |
$apt-cache show popa3d
Package: popa3d Priority: extra Section: mail Installed-Size: 152 Maintainer: Krzysztof Krzyżaniak (eloy) <eloy@debian.org> Architecture: i386 Version: 1.0.2-6 Provides: pop3-server Depends: libc6 (>= 2.0), libpam0g (>= 0.99.7.1) Pre-Depends: debconf (>= 1.2.9) | debconf-2.0, adduser, update-inetd ... SHA1: ac3e9362736f699df51fbbc2d8644aad8bc470b6 SHA256: 7a082af671975a9fd1783e5ce208426a02ed7a789475a45b3d69b9ab87d2e5e5 Description: A tiny POP3 daemon, designed with security as the primary goal popa3d is fast, small and secure pop3 daemon. It's written from scratch by Solar Designer for Owl (Openwall GNU/*/Linux). . Popa3d can work both in standalone or inetd mode. . For more information see DESIGN file. Tag: interface::daemon, mail::pop, network::server, protocol::pop3, role::program, security::authentication, works-with::mail |
$apt-cache show popa3d | less
|
$sudo apt-get install popa3d
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx libfile-copy-recursive-perl update-inetd Suggested packages: mail-reader eximon4 exim4-doc-html exim4-doc-info gnutls-bin openssl libmail-spf-query-perl swaks Recommended packages: ... Setting up exim4-config (4.71-4) ... Adding system-user for exim (v4) Setting up exim4-base (4.71-4) ... Setting up exim4-daemon-light (4.71-4) ... Starting MTA: exim4. Setting up exim4 (4.71-4) ... Setting up heirloom-mailx (12.4-1.1+b1) ... update-alternatives: error: no alternatives for mailx. update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode. Processing triggers for menu ... |
$nc
![]() Cmd line: ^C |
$nc 127.0.0.1 110
+OK USER user +OK PASS password +OK LIST +OK . QUIT +OK |
$dpkg -L popa3d
/. /usr /usr/sbin /usr/sbin/popa3d /usr/share /usr/share/doc /usr/share/doc/popa3d /usr/share/doc/popa3d/changelog.gz /usr/share/doc/popa3d/CONTACT /usr/share/doc/popa3d/README.Debian ... /usr/share/man/man8 /usr/share/man/man8/popa3d.8.gz /etc /etc/pam.d /etc/pam.d/popa3d /etc/init.d /etc/init.d/popa3d /var /var/lib /var/lib/popa3d |
$dpkg -L popa3d > /tmp/popa3d_files
|
$apt-get remove popa3d
![]() E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? |
$sudo apt-get remove popa3d
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libfile-copy-recursive-perl update-inetd Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: popa3d 0 upgraded, 0 newly installed, 1 to remove and 297 not upgraded. After this operation, 156kB disk space will be freed. Do you want to continue [Y/n]? (Reading database ... 56995 files and directories currently installed.) Removing popa3d ... Stopping pop daemon: popa3d. Processing triggers for man-db ... |
$cat /tmp/popa3d_files
/. /usr /usr/sbin /usr/sbin/popa3d /usr/share /usr/share/doc /usr/share/doc/popa3d /usr/share/doc/popa3d/changelog.gz /usr/share/doc/popa3d/CONTACT /usr/share/doc/popa3d/README.Debian ... /usr/share/man/man8 /usr/share/man/man8/popa3d.8.gz /etc /etc/pam.d /etc/pam.d/popa3d /etc/init.d /etc/init.d/popa3d /var /var/lib /var/lib/popa3d |
$ls /etc/pam.d/po
![]() polkit-1 popa3d |
$ls /etc/pam.d/popa3d
/etc/pam.d/popa3d |
$sudo apt-get install popa3d
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: popa3d 0 upgraded, 1 newly installed, 0 to remove and 297 not upgraded. Need to get 0B/32.9kB of archives. After this operation, 156kB of additional disk space will be used. Preconfiguring packages ... Selecting previously deselected package popa3d. (Reading database ... 56984 files and directories currently installed.) Unpacking popa3d (from .../popa3d_1.0.2-6_i386.deb) ... Processing triggers for man-db ... Setting up popa3d (1.0.2-6) ... Starting pop daemon: popa3d. |
$sudo apt-get --purge remove popa3d
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libfile-copy-recursive-perl update-inetd Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: popa3d* 0 upgraded, 0 newly installed, 1 to remove and 297 not upgraded. After this operation, 156kB disk space will be freed. Do you want to continue [Y/n]? (Reading database ... 56995 files and directories currently installed.) Removing popa3d ... Stopping pop daemon: popa3d. Purging configuration files for popa3d ... Processing triggers for man-db ... |
$ls /etc/pam.d/popa3d
![]() ls: cannot access /etc/pam.d/popa3d: No such file or directory |
$sudo apt-get --purge remove popa3d ^C
![]() |
$gft
![]() l3script: gft: command not found |
$gtf
![]() usage: gtf x y refresh [-v|--verbose] [-f|--fbmode] [-x|--xorgmode] x : the desired horizontal resolution (required) y : the desired vertical resolution (required) refresh : the desired refresh rate (required) -v|--verbose : enable verbose printouts (traces each step of the computation) -f|--fbmode : output an fbset(8)-style mode description -x|--xorgmode : output an Xorg-style mode description (this is the default if no mode description is requested) |
$sudo apt-get install apt-file
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libfile-copy-recursive-perl update-inetd Use 'apt-get autoremove' to remove them. The following extra packages will be installed: ca-certificates curl libapt-pkg-perl libconfig-file-perl libcurl3 libidn11 liblist-moreutils-perl libssh2-1 openssl The following NEW packages will be installed: ... Running hooks in /etc/ca-certificates/update.d....done. Setting up libcurl3 (7.20.1-2) ... Setting up curl (7.20.1-2) ... Setting up libconfig-file-perl (1.50-2) ... Setting up libapt-pkg-perl (0.1.24) ... Setting up liblist-moreutils-perl (0.25~02-1) ... Setting up apt-file (2.3.3) ... The system-wide cache is empty. You may want to run 'apt-file update' as root to update the cache. You can also run 'apt-file update' as normal user to use a cache in the user's home directory. |
$sudo apt-file update
Downloading complete file http://10.0.35.1:9999/debian/dists/squeeze/Contents-i386.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16.4M 100 16.4M 0 0 356k 0 0:00:47 0:00:47 --:--:-- 400k Ignoring source without Contents File: http://security.debian.org/dists/testing/updates/Contents-i386.gz |
$apt-file /etc/squid3/squid.conf
![]() apt-file version 2.3.3 (c) 2002 Sebastien J. Gross <sjg@debian.org> apt-file [options] action [pattern] Configuration options: --sources-list -s <file> sources.list location --cache -c <dir> Cache directory --architecture -a <arch> Use specific architecture --cdrom-mount -d <cdrom> Use specific cdrom mountpoint --non-interactive -N Skip schemes requiring user input (useful in cron jobs) ... --regexp -x pattern is a regular expression --verbose -v run in verbose mode --dummy -y run in dummy mode (no action) --help -h Show this help. --version -V Show version number Action: update Fetch Contents files from apt-sources. search|find <pattern> Search files in packages list|show <pattern> List files in packages purge Remove cache files |
$apt-file search /etc/squid3/squid.conf
squid3: /etc/squid3/squid.conf |
$dpkg -l | grep squid
![]() |
$apt-
![]() apt-cache apt-file apt-mark apt-cdrom apt-ftparchive apt-sortpkgs apt-config apt-get apt-extracttemplates apt-key |
$apt-get
![]() autoclean clean purge upgrade autoremove dist-upgrade remove build-dep dselect-upgrade source check install update |
$apt-get install apt-
![]() apt-build apt-howto-uk apt-spy apt-cacher apt-index-watcher apt-src apt-cacher-ng apt-listbugs apt-transport-debtorrent apt-cross apt-listchanges apt-transport-https apt-dater apt-mirror apt-utils apt-dater-dbg apt-move apt-watch apt-dater-host apt-offline apt-watch-backend apt-doc apt-p2p apt-watch-gnome apt-dpkg-ref apt-rdepends apt-watch-interface apt-file apt-rpm-client apt-xapian-index apt-forktracer apt-show-source apt-zip apt-howto-fr apt-show-versions |
$sudo apt-get install apt-mirror
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libfile-copy-recursive-perl update-inetd Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: apt-mirror 0 upgraded, 1 newly installed, 0 to remove and 297 not upgraded. Need to get 15.1kB of archives. After this operation, 127kB of additional disk space will be used. Get:1 http://10.0.35.1 squeeze/main apt-mirror 0.4.8-1 [15.1kB] Fetched 15.1kB in 0s (60.3kB/s) Selecting previously deselected package apt-mirror. (Reading database ... 57636 files and directories currently installed.) Unpacking apt-mirror (from .../apt-mirror_0.4.8-1_all.deb) ... Processing triggers for man-db ... Setting up apt-mirror (0.4.8-1) ... |
$man apt-mirror
|
$sudo apt-mirror --help
![]() apt-mirror: invalid config file specified at /usr/bin/apt-mirror line 122. |
$vim /etc/apt/
![]() |
$vim /etc/apt/mirror.list
|
deb http://10.0.35.1:9999/debian squeeze main contrib non-free #deb http://debian.org.ua/debian squeeze main contrib non-free deb http://security.debian.org/ testing/updates main
/. /usr /usr/sbin /usr/sbin/popa3d /usr/share /usr/share/doc /usr/share/doc/popa3d /usr/share/doc/popa3d/changelog.gz /usr/share/doc/popa3d/CONTACT /usr/share/doc/popa3d/README.Debian /usr/share/doc/popa3d/VIRTUAL /usr/share/doc/popa3d/copyright /usr/share/doc/popa3d/changelog.Debian.gz /usr/share/doc/popa3d/DESIGN.gz /usr/share/man /usr/share/man/man8 /usr/share/man/man8/popa3d.8.gz /etc /etc/pam.d /etc/pam.d/popa3d /etc/init.d /etc/init.d/popa3d /var /var/lib /var/lib/popa3d
Время первой команды журнала | 15:48:08 2010- 5-20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:43:26 2010- 5-21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 26.73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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