/l3/users/goddan/nt-voip/linux4.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#[speex]ves clarity of decoded speech incurs CPU overhead
|
#;
[ New File ] ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos Use "fg" to return to nano.y ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell [4]+ Stopped /usr/bin/nano "$@" |
#init -0
init: invalid option -- '0' Usage: init {-e VAR[=VAL] | [-t SECONDS] {0|1|2|3|4|5|6|S|s|Q|q|A|a|B|b|C|c|U|u}} |
#init 0
|
#ls pci
ls: cannot access pci: No such file or directory |
#lspci
00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Sandy Bridge Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04) 00:16.2 IDE interface: Intel Corporation Cougar Point IDE-r Controller (rev 04) 00:16.3 Serial controller: Intel Corporation Cougar Point KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 8 (rev b4) 00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Cougar Point LPC Controller (rev 04) 00:1f.2 IDE interface: Intel Corporation Cougar Point 4 port SATA IDE Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 04) 00:1f.5 IDE interface: Intel Corporation Cougar Point 2 port SATA IDE Controller (rev 04) 05:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) |
#lsmod
Module Size Used by cpufreq_powersave 12422 0 cpufreq_userspace 12520 0 cpufreq_stats 12711 0 cpufreq_conservative 12987 0 rfcomm 31985 0 bridge 59326 0 stp 12405 1 bridge bnep 17147 2 bluetooth 106783 10 rfcomm,bnep ... ata_generic 12439 0 3c59x 30509 0 mii 12595 1 3c59x e1000e 112876 0 ata_piix 25240 2 libata 124180 2 ata_generic,ata_piix scsi_mod 134461 4 sg,sr_mod,sd_mod,libata ehci_hcd 34968 0 usbcore 103673 2 ehci_hcd usb_common 12338 1 usbcore |
#find /sys -name \*21:08.0\
> ^C |
#lspci
00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Sandy Bridge Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04) 00:16.2 IDE interface: Intel Corporation Cougar Point IDE-r Controller (rev 04) 00:16.3 Serial controller: Intel Corporation Cougar Point KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 8 (rev b4) 00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Cougar Point LPC Controller (rev 04) 00:1f.2 IDE interface: Intel Corporation Cougar Point 4 port SATA IDE Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 04) 00:1f.5 IDE interface: Intel Corporation Cougar Point 2 port SATA IDE Controller (rev 04) 05:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) |
#find /sys/ -name \05:00.0\*
|
#find /sys/ -name \05:00.0\*
|
#modinfo wcte12xp | head
filename: /lib/modules/3.2.0-0.bpo.4-686-pae/dahdi/wcte12xp/wcte12xp.ko license: GPL v2 author: Digium Incorporated <support@digium.com> description: Wildcard VoiceBus Digital Card Driver alias: pci:v0000D161d00008001sv*sd*bc*sc*i* alias: pci:v0000D161d00008000sv*sd*bc*sc*i* alias: pci:v0000D161d00000120sv*sd*bc*sc*i* depends: dahdi_voicebus,dahdi vermagic: 3.2.0-0.bpo.4-686-pae SMP mod_unload modversions 686 parm: debug:int |
#modinfo 3c59x
filename: /lib/modules/3.2.0-0.bpo.4-686-pae/kernel/drivers/net/ethernet/3com/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* alias: pci:v000010B7d00004500sv*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) |
#apt-cahe search dahdi
bash: apt-cahe: command not found |
#apt-cashe search dahdi
bash: apt-cashe: command not found |
#apt-cache search dahdi
dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules libopenr2-3 - MFC/R2 (telephony) call setup library libopenr2-bin - MFC/R2 (telephony) call setup library - test programs libopenr2-dev - MFC/R2 (telephony) call setup library - development headers yate-dahdi - Dahdi support for YATE asterisk-dahdi - DAHDI devices support for the Asterisk PBX |
#dahdi_
dahdi_cfg dahdi_genconf dahdi_monitor dahdi_scan dahdi_tool dahdi_diag dahdi_hardware dahdi_registration dahdi_test |
#dahdi_
dahdi_cfg dahdi_genconf dahdi_monitor dahdi_scan dahdi_tool dahdi_diag dahdi_hardware dahdi_registration dahdi_test |
#witch dahdi_genconf
bash: witch: command not found |
#nano /etc/asterisk/ext
|
#nano /etc/asterisk/extensions.conf
|
#[menu]>s,n(start),Background(/var/tmp/message/02)
|
#[general]
say.conf sip.conf.orig sip_notify.conf sla.conf sip.conf sip.conf.save skinny.conf smdi.conf |
#nano /etc/asterisk/s
|
#ls /etc/asterisk/
adsi.conf console.conf iax.conf res_ldap.conf adtranvofr.conf dbsep.conf iaxprov.conf res_odbc.conf agents.conf dnsmgr.conf indications.conf res_pgsql.conf ais.conf dsp.conf jabber.conf res_snmp.conf alarmreceiver.conf dundi.conf jingle.conf rpt.conf alsa.conf enum.conf logger.conf rtp.conf amd.conf extconfig.conf manager.conf say.conf asterisk.adsi extensions.ael manager.d sip.conf asterisk.conf extensions.conf meetme.conf sip.conf.orig cdr_adaptive_odbc.conf extensions.conf.orig mgcp.conf sip.conf.save ... cdr_manager.conf extensions.conf.save.2 modules.conf sla.conf cdr_odbc.conf extensions.lua musiconhold.conf smdi.conf cdr_pgsql.conf extensions_minivm.conf muted.conf telcordia-1.adsi cdr_sqlite3_custom.conf features.conf osp.conf udptl.conf cdr_tds.conf festival.conf oss.conf unistim.conf chan_dahdi.conf followme.conf phone.conf usbradio.conf cli_aliases.conf func_odbc.conf phoneprov.conf users.conf cli.conf gtalk.conf queuerules.conf voicemail.conf cli_permissions.conf h323.conf queues.conf voicemail.conf.save codecs.conf http.conf res_config_sqlite.conf vpb.conf |
#nano /etc/asterisk/extensions.conf
|
#apt-get install asterisk-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-dev 0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded. Need to get 637 kB of archives. After this operation, 1,741 kB of additional disk space will be used. Get:1 http://192.168.15.253/debian/ squeeze/main asterisk-dev all 1:1.6.2.9-2+squeeze10 [637 kB] Fetched 637 kB in 0s (21.7 MB/s) Selecting previously deselected package asterisk-dev. (Reading database ... 126939 files and directories currently installed.) Unpacking asterisk-dev (from .../asterisk-dev_1%3a1.6.2.9-2+squeeze10_all.deb) ... Setting up asterisk-dev (1:1.6.2.9-2+squeeze10) ... |
#cd chan-datacard/
|
#ls
__app.c __at_response.c __channel.c COPYRIGHT.txt Makefile.in __ringbuffer.c __at_fifo_queue.c __at_send.c __char_conv.c etc __manager.c __ringbuffer.h __at_parse.c chan_datacard.c __cli.c __helpers.c __memmem.c __at_read.c chan_datacard.h configure LICENSE.txt README.txt |
#./configure
configure complete, now type 'make' |
#make -j32
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so |
#make install
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so install -d /usr/lib/asterisk/modules/ install -m 755 chan_datacard.so /usr/lib/asterisk/modules/ |
#ls /usr/lib/as
aspell/ asterisk/ |
#ls /usr/lib/as
aspell/ asterisk/ |
#ls /usr/lib/asterisk/modules/
app_adsiprog.so app_senddtmf.so codec_alaw.so func_odbc.so app_alarmreceiver.so app_sendtext.so codec_a_mu.so func_rand.so app_amd.so app_setcallerid.so codec_dahdi.so func_realtime.so app_authenticate.so app_sms.so codec_g722.so func_sha1.so app_cdr.so app_softhangup.so codec_g726.so func_shell.so app_chanisavail.so app_speech_utils.so codec_gsm.so func_speex.so app_channelredirect.so app_stack.so codec_lpc10.so func_sprintf.so app_chanspy.so app_system.so codec_resample.so func_strings.so app_confbridge.so app_talkdetect.so codec_speex.so func_sysinfo.so app_controlplayback.so app_test.so codec_ulaw.so func_timeout.so ... app_parkandannounce.so chan_jingle.so func_env.so res_realtime.so app_playback.so chan_local.so func_extstate.so res_smdi.so app_playtones.so chan_mgcp.so func_global.so res_snmp.so app_privacy.so chan_oss.so func_groupcount.so res_speech.so app_queue.so chan_phone.so func_iconv.so res_timing_dahdi.so app_readexten.so chan_sip.so func_lock.so res_timing_pthread.so app_readfile.so chan_skinny.so func_logic.so res_timing_timerfd.so app_read.so chan_unistim.so func_math.so app_record.so chan_vpb.so func_md5.so app_sayunixtime.so codec_adpcm.so func_module.so |
#dmesg | grep -i ttyUSB
|
#nano /etc/asterisk/datacard.conf
|
#make install
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so install -d /usr/lib/asterisk/modules/ install -m 755 chan_datacard.so /usr/lib/asterisk/modules/ |
#cp etc/datacard.conf /etc/asterisk/
|
#nano /etc/asterisk/datacard.conf
|
#audio=/dev/ttyUSB4 ; tty port for audio connection
Bus 002 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
#lsmod
Module Size Used by option 24816 0 usb_wwan 12950 1 option usbserial 27298 2 option,usb_wwan usb_storage 34910 0 cpufreq_powersave 12422 0 cpufreq_userspace 12520 0 cpufreq_stats 12711 0 cpufreq_conservative 12987 0 rfcomm 31985 0 ... ata_generic 12439 0 3c59x 30509 0 mii 12595 1 3c59x e1000e 112876 0 ata_piix 25240 2 libata 124180 2 ata_generic,ata_piix scsi_mod 134461 5 usb_storage,sg,sr_mod,sd_mod,libata ehci_hcd 34968 0 usbcore 103673 6 option,usb_wwan,usbserial,usb_storage,ehci_hcd usb_common 12338 1 usbcore |
#dmesg | grep -iC2 ttyUSB
[14144.378687] USB Serial support registered for GSM modem (1-port) [14144.378716] option 2-1.7:1.0: GSM modem (1-port) converter detected [14144.378853] usb 2-1.7: GSM modem (1-port) converter now attached to ttyUSB0 [14144.378869] option 2-1.7:1.1: GSM modem (1-port) converter detected [14144.378989] usb 2-1.7: GSM modem (1-port) converter now attached to ttyUSB1 [14144.379001] option 2-1.7:1.2: GSM modem (1-port) converter detected [14144.379103] usb 2-1.7: GSM modem (1-port) converter now attached to ttyUSB2 [14144.379119] usbcore: registered new interface driver option [14144.379121] option: v0.7.2:USB Driver for GSM modems |
#nano /etc/asterisk/datacard.conf
--- /tmp/l3-saved-1978.26530.30459 2013-04-12 13:13:37.000000000 +0300 +++ /etc/asterisk/datacard.conf 2013-04-12 13:14:22.000000000 +0300 @@ -51,7 +51,7 @@ audio=/dev/ttyUSB1 ; tty for audio connection data=/dev/ttyUSB2 ; tty for AT commands group=1 ; calling group - +context=usb_mobile [datacard1] context=incoming-datacard ; context for incoming calls |
#[general]
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux4 (pid = 3324) linux4*CLI> data database datacard [Apr 12 13:14:54] WARNING[3350]: chan_datacard.c:108 opentty: Unable to open '/dev/ttyUSB5' linux4*CLI> datacard show No such command 'datacard show' (type 'core show help datacard show' for other possible commands) linux4*CLI> datacard ccwa cmd reset show sms ussd linux4*CLI> datacard show No such command 'datacard show' (type 'core show help datacard show' for other possible commands) [Apr 12 13:15:09] WARNING[3350]: chan_datacard.c:108 opentty: Unable to open '/dev/ttyUSB5' [Apr 12 13:15:24] WARNING[3350]: chan_datacard.c:108 opentty: Unable to open '/dev/ttyUSB5' linux4*CLI> quit |
#nano /etc/asterisk/datacard.conf
--- /tmp/l3-saved-1978.4363.7176 2013-04-12 13:15:35.000000000 +0300 +++ /etc/asterisk/datacard.conf 2013-04-12 13:16:12.000000000 +0300 @@ -54,18 +54,18 @@ context=usb_mobile [datacard1] -context=incoming-datacard ; context for incoming calls +;context=incoming-datacard ; context for incoming calls ;language=de ; Use German as default language -audio=/dev/ttyUSB4 ; tty port for audio connection -data=/dev/ttyUSB5 ; tty port for AT commands -group=2 ; calling group -rxgain=10 ; increase the incoming volume -txgain=10 ; increase the outgoint volume -autodeletesms=yes ; auto delete incoming sms -resetdatacard=yes ; reset datacard during initialization -u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) -usecallingpres=yes ; use the caller ID presentation or not -callingpres=allowed_passed_screen ; set caller ID presentation -disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a +;audio=/dev/ttyUSB4 ; tty port for audio connection +;data=/dev/ttyUSB5 ; tty port for AT commands +;group=2 ; calling group +;rxgain=10 ; increase the incoming volume +;txgain=10 ; increase the outgoint volume +;autodeletesms=yes ; auto delete incoming sms +;resetdatacard=yes ; reset datacard during initialization +;u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) +;usecallingpres=yes ; use the caller ID presentation or not +;callingpres=allowed_passed_screen ; set caller ID presentation +;disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a ; call chan_datacard might crash. Enable this option to disable sms reception. ; Default = no |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1978.33.11338 2013-04-12 13:18:21.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 13:20:03.000000000 +0300 @@ -151,3 +151,8 @@ [gr_ua] include=>ua + +[usb_mobile] +exten => ussd,1,Verbose(Incoming USSD: ${USSD},2) | +exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DATACARD}: ${USSD}' >> /var/log/asterisk/ussd.txt) | +exten => ussd,n,Hangup() |
#{EXTEN})
Dialplan reloaded. |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux4 (pid = 3417) Verbosity was 0 and is now 2 linux4*CLI> datacard ussd datacard0 *101# '[datacard0] Got USSD response: '39.37 UAH, dejstvitelen do 09.10.2013. Tarif - Super MTS 3D Nol 25. * Zvonite na nomera 0-800-XXX BESPLATNO! Detali:111 [Apr 12 13:21:02] WARNING[3525]: app_verbose.c:97 verbose_exec: 'Incoming USSD: 39.37 UAH' is not a verboser number dejstvitelen do 09.10.2013. Tarif - Super MTS 3D Nol 25. * Zvonite na nomera 0-800-XXX BESPLATNO! Detali:111,2 == Spawn extension (usb_mobile, ussd, 3) exited non-zero on 'Local/ussd@usb_mobile-7d8e;1' linux4*CLI> quit Executing last minute cleanups |
#cat /var/log/asterisk/ussd.txt
2013-04-12 13:21:02 - datacard0: 39.37 UAH, dejstvitelen do 09.10.2013. Tarif - Super MTS 3D Nol 25. * Zvonite na nomera 0-800-XXX BESPLATNO! Detali:111 |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1978.14235.20770 2013-04-12 13:22:21.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 13:22:55.000000000 +0300 @@ -156,3 +156,8 @@ exten => ussd,1,Verbose(Incoming USSD: ${USSD},2) | exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DATACARD}: ${USSD}' >> /var/log/asterisk/ussd.txt) | exten => ussd,n,Hangup() + +exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${SMS},2) | +exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DATACARD} - ${CALLERID(num)}: ${SMS}' | mail -s 'SMS From Asterisk' use$| +exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DATACARD} - ${CALLERID(num)}: ${SMS}' >> /var/log/asterisk/sms.txt) | +exten => sms,n,Hangup() |
#[gr_all]
|
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1978.10840.1073 2013-04-12 13:29:00.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 13:30:08.000000000 +0300 @@ -134,10 +134,9 @@ [ua] ;exten=>_380XXXXXXXXX,1,Dial(SIP/minsk/${EXTEN}) - exten => _380XXXXXXXXX,1,Answer -;same => n,Dial(datacard/datacard0/+${EXTEN},30) - same => n,Dial(datacard/p:MTS UKR/+${EXTEN},30) +same => n,Dial(datacard/datacard0/+${EXTEN},30) +; same => n,Dial(datacard/p:MTS UKR/+${EXTEN},30) [gr_country] |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1978.23714.19260 2013-04-12 13:30:52.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 13:31:49.000000000 +0300 @@ -147,6 +147,7 @@ [gr_city] include=>local +include=>ua [gr_all] include=>national |
#apt-get install ejaberd
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ejaberd |
#apt-get install ejabberd
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: erlang-asn1 erlang-base erlang-crypto erlang-inets erlang-mnesia erlang-odbc erlang-public-key erlang-runtime-tools erlang-ssl erlang-syntax-tools libsctp1 lksctp-tools Suggested packages: libunix-syslog-perl erlang erlang-manpages erlang-doc erlang-tools The following NEW packages will be installed: ejabberd erlang-asn1 erlang-base erlang-crypto erlang-inets erlang-mnesia erlang-odbc erlang-public-key ... Setting up erlang-inets (1:14.a-dfsg-3squeeze1) ... Setting up erlang-odbc (1:14.a-dfsg-3squeeze1) ... Setting up ejabberd (2.1.5-3+squeeze1) ... adduser: Warning: The home directory `/var/lib/ejabberd' does not belong to the user you are currently creating. Generating SSL certificate /etc/ejabberd/ejabberd.pem... Creating config file /etc/ejabberd/ejabberd.cfg with new version Starting jabber server: ejabberd. Setting up libsctp1 (1.0.11+dfsg-1) ... Setting up lksctp-tools (1.0.11+dfsg-1) ... Processing triggers for menu ... |
#dpkg-reconfigure ejabberd
âââââââââââââââââââââââââââ⤠Configuring ejabberd ââââââââââââââââââââââââââââ â Please reenter the password for the administrative user for verification. â â â â The password for the admin account again for verification: â â â â********____________________________________________________________________ â â â â <Ok> â â â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Replacing config file /etc/ejabberd/ejabberd.cfg with new version Starting jabber server: ejabberd. Waiting for ejabberd to register admin user. Admin user "admin@linux4" is registered successfully. |
#ejaberdctl
bash: ejaberdctl: command not found |
##5280
|
#dpkg-reconfigure ejabberd
âââââââââââââââââââââââââââ⤠Configuring ejabberd ââââââââââââââââââââââââââââ â Please reenter the password for the administrative user for verification. â â â â The password for the admin account again for verification: â â â â********____________________________________________________________________ â â â â <Ok> â â â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Replacing config file /etc/ejabberd/ejabberd.cfg with new version Starting jabber server: ejabberd. Waiting for ejabberd to register admin user. Admin user "admin@linux4.unix.nt" is registered successfully. |
#apt-get install pijin
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pijin |
#apt-get install pidjin
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pidjin |
#apt-get install pidgin
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmeanwhile1 libpurple-bin libpurple0 libsilc-1.1-2 libsilcclient-1.1-3 libzephyr4 pidgin-data Suggested packages: tk8.4 The following NEW packages will be installed: libmeanwhile1 libpurple-bin libpurple0 libsilc-1.1-2 libsilcclient-1.1-3 libzephyr4 pidgin pidgin-data 0 upgraded, 8 newly installed, 0 to remove and 31 not upgraded. ... Processing triggers for gconf2 ... Setting up libmeanwhile1 (1.0.2-3) ... Setting up pidgin-data (2.7.3-1+squeeze3) ... Setting up libsilc-1.1-2 (1.1.10-2) ... Setting up libsilcclient-1.1-3 (1.1.10-2) ... Setting up libzephyr4 (3.0-1) ... Setting up libpurple0 (2.7.3-1+squeeze3) ... Setting up libpurple-bin (2.7.3-1+squeeze3) ... Setting up pidgin (2.7.3-1+squeeze3) ... Processing triggers for menu ... |
#apt-get install sendxmpp
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libauthen-sasl-perl libdigest-sha1-perl libio-socket-ssl-perl libnet-libidn-perl libnet-ssleay-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libio-socket-inet6-perl libnet-dns-perl The following NEW packages will be installed: libauthen-sasl-perl libdigest-sha1-perl libio-socket-ssl-perl libnet-libidn-perl libnet-ssleay-perl libnet-xmpp-perl ... Unpacking sendxmpp (from .../sendxmpp_1.20-1_all.deb) ... Processing triggers for man-db ... Setting up libauthen-sasl-perl (2.1500-1) ... Setting up libdigest-sha1-perl (2.13-1) ... Setting up libnet-ssleay-perl (1.36-1) ... Setting up libio-socket-ssl-perl (1.33-1+squeeze1) ... Setting up libnet-libidn-perl (0.12.ds-1+b1) ... Setting up libxml-stream-perl (1.23-1) ... Setting up libnet-xmpp-perl (1.02-1) ... Setting up sendxmpp (1.20-1) ... |
#touch /var/lib/asterisk/.sendxmpprc
|
#nano /var/lib/as
--- /dev/null 2013-04-12 09:12:00.300776615 +0300 +++ /var/lib/asterisk/jabber-send 2013-04-12 14:35:51.000000000 +0300 @@ -0,0 +1,5 @@ +#!/bin/sh + +JID="$1" +shift +echo $* | sendxmpp -f /var/lib/asterisk/.sendxmpprc "$JID" |
#nano /var/lib/as
--- /tmp/l3-saved-1978.29046.10292 2013-04-12 14:37:22.000000000 +0300 +++ /var/lib/asterisk/.sendxmpprc 2013-04-12 14:37:37.000000000 +0300 @@ -0,0 +1 @@ +asterisk@linux4.unix.nt password |
#nano /var/lib/asterisk/jabber-send
--- /tmp/l3-saved-1978.29186.7733 2013-04-12 14:38:16.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 14:41:06.000000000 +0300 @@ -113,7 +113,11 @@ exten=>_14XX,1,Answer ;exten=>_14XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}) ;exten=>_14XX,n,Monitor(wav,${CALLFILENAME},m) + +exten => _14XX,n,System(/usr/local/bin/asterisk-jabber-send user@linux7.unix.nt You have a call from ${CALLERID(num)}) + exten=>_14XX,n,Dial(SIP/${EXTEN},30,wWtTm) + ;exten=>_14XX,n,Voicemail(${EXTEN}@default) exten=>1405,1,Answer |
#!/bin/sh
|
#/var/lib/asterisk/jabber-send user@linux.nt hello
you must own /var/lib/asterisk/.sendxmpprc |
#nano /var/lib/asterisk/.
--- /tmp/l3-saved-1978.21302.13780 2013-04-12 14:42:11.000000000 +0300 +++ /etc/asterisk/extensions.conf 2013-04-12 14:42:36.000000000 +0300 @@ -114,7 +114,7 @@ ;exten=>_14XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}) ;exten=>_14XX,n,Monitor(wav,${CALLFILENAME},m) -exten => _14XX,n,System(/usr/local/bin/asterisk-jabber-send user@linux7.unix.nt You have a call from ${CALLERID(num)}) +exten => _14XX,n,System(/usr/local/bin/asterisk-jabber-send user@linux4.unix.nt You have a call from ${CALLERID(num)}) exten=>_14XX,n,Dial(SIP/${EXTEN},30,wWtTm) |
#nano /var/lib/asterisk/.
|
#nano /var/lib/asterisk/.sendxmpprc
|
#asterisk@linux4.unix.nt password
GNU nano 2.2.4 File: /etc/asterisk/extensions.conf Modified [default]02,n,GotoIf($[${PASSWORD}==1234]?correct_password:invalid_password) exten=>8000,1,Answerd_password),Playback(vm-invalid-password) exten=>8000,n,Wait(2)(/var/tmp/message/01) exten=>8000,n,Playback(welcome),System(sudo eject) ;record> 8703,1,Set(ABC=${SHELL(date)})03) exten=>_81XX,1,Record(/var/tmp/message/${EXTEN:2}:gsm,1) exten=>_81XX,n,Playback(/var/tmp/message/${EXTEN:2}) exten=>_82XX,1,Playback(/var/tmp/message/${EXTEN:2}) exten=>8300,1,Voicemailmain() ... ;exten=>_14XX,n,Voicemail(${EXTEN}@default) exten=>_14XX,1,Answer$[${PASSWORD}==1234]?correct_password:invalid_password) ;exten=>_14XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}) ;exten=>_14XX,n,Monitor(wav,${CALLFILENAME},m) exten => _14XX,n,System(/usr/local/bin/asterisk-jabber-send user@linux7.unix.nt You have a call from ${CALLERID(num)}) exten => _14XX,n,System(/usr/local/bin/asterisk-jabber-send user@linux7.unix.nt You have a call from ${CALLERID(num)}) exten=>1405,n,Dial(SIP/1401&SIP/1402) exten=>1406,1,Answer ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell |
#cat /var/lib/asterisk/jabber-send
#!/bin/sh JID="$1" shift echo $* | sendxmpp -f /var/lib/asterisk/.sendxmpprc "$JID" |
#chown asterisk:asterisk /var/lib/asterisk/jabber-send
|
#ls -l /var/lib/asterisk/jabber-send
-rwxr-xr-x 1 asterisk asterisk 85 Apr 12 14:35 /var/lib/asterisk/jabber-send |
#ls- lk /var/lib/.
./ ../ |
#ls /var/lib/.
ls lsb_release lsdahdi lsmod lspci lsusb lsattr lscpu lsinitramfs lsof lspgpot |
#ls /var/lib/asterisk/.
./ ../ .sendxmpprc |
#ls /var/lib/asterisk/.sendxmpprc
/var/lib/asterisk/.sendxmpprc |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux4 (pid = 3417) Verbosity is at least 2 == Spawn extension (gr_country, 1402, 2) exited non-zero on 'SIP/1401-0000000d' == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 [Apr 12 14:56:48] WARNING[3443]: chan_datacard.c:108 opentty: Unable to open '/dev/ttyUSB2' == Spawn extension (gr_country, 1402, 2) exited non-zero on 'SIP/1401-0000000f' linux4*CLI> quit Executing last minute cleanups |
#;exten=>_1014XX01,1,Dial(SIP/{EXTEN:2:4})
asterisk: invalid option -- 'a' |
#asterisk -rv 'dialplan reload'
Asterisk 1.6.2.9-2+squeeze10, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze10 currently running on linux4 (pid = 3417) Verbosity is at least 2 linux4*CLI> dialplan reload Dialplan reloaded. == Parsing '/etc/asterisk/extensions.conf': == Found [Apr 12 14:58:41] WARNING[6610]: pbx.c:7485 add_pri_lockopt: Unable to register extension '9', priority 1 in 'menu', already in use == Parsing '/etc/asterisk/users.conf': == Found == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 [Apr 12 14:58:48] WARNING[3443]: chan_datacard.c:108 opentty: Unable to open '/dev/ttyUSB2' [Apr 12 14:58:51] NOTICE[6611]: rtp.c:1143 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.40.101 linux4*CLI> quit Executing last minute cleanups |
#less /var/log/asterisk/cdr-csv/Master.csv
|
#apt-get install asterisk-mysql
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-mysql 0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded. Need to get 47.4 kB of archives. After this operation, 176 kB of additional disk space will be used. Get:1 http://192.168.15.253/debian/ squeeze/main asterisk-mysql i386 1.6.2.1-1 [47.4 kB] Fetched 47.4 kB in 0s (2,370 kB/s) Selecting previously deselected package asterisk-mysql. (Reading database ... 129164 files and directories currently installed.) Unpacking asterisk-mysql (from .../asterisk-mysql_1.6.2.1-1_i386.deb) ... Setting up asterisk-mysql (1.6.2.1-1) ... |
#dpkg -L asterisk-mysql
/. /usr /usr/lib /usr/lib/asterisk /usr/lib/asterisk/modules /usr/lib/asterisk/modules/cdr_addon_mysql.so /usr/lib/asterisk/modules/app_addon_sql_mysql.so /usr/lib/asterisk/modules/res_config_mysql.so /usr/share /usr/share/doc /usr/share/doc/asterisk-mysql /usr/share/doc/asterisk-mysql/changelog.gz /usr/share/doc/asterisk-mysql/cdr_mysql.txt /usr/share/doc/asterisk-mysql/examples /usr/share/doc/asterisk-mysql/examples/cdr_mysql.conf.sample /usr/share/doc/asterisk-mysql/examples/res_mysql.conf.sample /usr/share/doc/asterisk-mysql/changelog.Debian.gz /usr/share/doc/asterisk-mysql/README /usr/share/doc/asterisk-mysql/copyright |
#less /usr/share/doc/asterisk-mysql/cdr_mysql.txt
|
#nano /tmp/cdr_mysql.txt
--- /tmp/l3-saved-1978.24853.14095 2013-04-12 15:06:22.000000000 +0300 +++ /tmp/cdr_mysql.txt 2013-04-12 15:06:40.000000000 +0300 @@ -1,12 +1,6 @@ -Call Detail Recording for MySQL -=============================== - -Usage: -====== - -Include the module in your modules.conf. Change the database hostname, database name, username, and password in cdr_mysql.conf. - -Create a table called cdr under the database name you will be using the following schema. +DROP DATABASE asterisk; +CREATE DATABASE asterisk; +USE asterisk; CREATE TABLE cdr ( calldate datetime NOT NULL default '0000-00-00 00:00:00', @@ -27,4 +21,3 @@ userfield varchar(255) NOT NULL default '' ); -The calls will automatically be logged as long as the module is loaded. |
#apt-get install mysql-server
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server-5.1 mysql-server-core-5.1 Suggested packages: libipc-sharedcache-perl libterm-readkey-perl tinyca The following NEW packages will be installed: libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server mysql-server-5.1 mysql-server-core-5.1 0 upgraded, 9 newly installed, 0 to remove and 31 not upgraded. Need to get 21.3 MB of archives. After this operation, 50.5 MB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://192.168.15.253/debian/ squeeze/main libnet-daemon-perl all 0.43-1 [46.6 kB] Get:2 http://192.168.15.253/debian/ squeeze/main libplrpc-perl all 0.2020-2 [36.0 kB] Get:3 http://192.168.15.253/debian/ squeeze/main libdbi-perl i386 1.612-1 [879 kB] Get:4 http://192.168.15.253/debian/ squeeze/main libdbd-mysql-perl i386 4.016-1 [138 kB] Get:5 http://192.168.15.253/debian/ squeeze/main mysql-client-5.1 i386 5.1.49-3 [9,605 kB] 10% [5 mysql-client-5.1 1,167 kB/9,605 kB 12%] 369 kB/s 51s^C |
#apt-get install mysql-server
Package configuration âââââââ⤠Configuring mysql-server-5.1 âââââââââ â â â â â Repeat password for the MySQL "root" user: â â â â********_____________________________________ â â â â <Ok> â â â ... Setting up mysql-server-5.1 (5.1.49-3) ... Stopping MySQL database server: mysqld. 130412 15:11:24 [Note] Plugin 'FEDERATED' is disabled. 130412 15:11:25 InnoDB: Started; log sequence number 0 44233 130412 15:11:25 InnoDB: Starting shutdown... 130412 15:11:30 InnoDB: Shutdown completed; log sequence number 0 44233 Starting MySQL database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables.. Setting up libhtml-template-perl (2.9-2) ... Setting up mysql-server (5.1.49-3) ... |
#mysql-p </tmp/cdr_mysql.txt
bash: mysql-p: command not found |
#mysql -p </tmp/cdr_mysql.txt
Enter password: ERROR 1008 (HY000) at line 1: Can't drop database 'asterisk'; database doesn't exist |
#nano /tmp/cdr_mysql.txt
--- /tmp/l3-saved-1978.15042.12228 2013-04-12 15:12:52.000000000 +0300 +++ /tmp/cdr_mysql.txt 2013-04-12 15:12:58.000000000 +0300 @@ -1,4 +1,3 @@ -DROP DATABASE asterisk; CREATE DATABASE asterisk; USE asterisk; |
#mysql -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.1.49-3 (Debian) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show database -> ^CCtrl-C -- exit! Aborted |
#mysql -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 43 Server version: 5.1.49-3 (Debian) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from cdr -> quit -> ^CCtrl-C -- exit! Aborted |
#mysql -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 44 Server version: 5.1.49-3 (Debian) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use asterisk Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables -> ^CCtrl-C -- exit! Aborted |
#!/bin/sh JID="$1" shift echo $* | sendxmpp -f /var/lib/asterisk/.sendxmpprc "$JID"
2013-04-12 13:21:02 - datacard0: 39.37 UAH, dejstvitelen do 09.10.2013. Tarif - Super MTS 3D Nol 25. * Zvonite na nomera 0-800-XXX BESPLATNO! Detali:111
Время первой команды журнала | 16:32:57 2013- 4-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:15:19 2013- 4-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 19.80 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 6.93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.58 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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