/l3/users/kuzmenko/nt-scale-22-10-2010/linux4.unix.nt.unix.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 |
|
#dd if=/dev/zero of=disk2.img seek=20480 bs=1024k count=1
1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00382065 s, 274 MB/s |
#losetup /dev/loop1 disk1.img
|
#losetup /dev/loop2 disk2.img
|
#ls /dev/mapper/
control |
#mdadm -C /dev/md0 --level 1 --raid-devices 2 /dev/loop1 /dev/loop2
mdadm: array /dev/md0 started. |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 20972480 blocks [2/2] [UU] [==>..................] resync = 10.1% (2138048/20972480) finish=2.6min speed=118780K/sec unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 20972480 blocks [2/2] [UU] [==>..................] resync = 13.9% (2920832/20972480) finish=2.6min speed=112339K/sec unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 20972480 blocks [2/2] [UU] [==>..................] resync = 14.5% (3052736/20972480) finish=2.8min speed=105266K/sec unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 20972480 blocks [2/2] [UU] [===>.................] resync = 15.5% (3257792/20972480) finish=2.8min speed=101806K/sec unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 20972480 blocks [2/2] [UU] [===>.................] resync = 15.8% (3333056/20972480) finish=3.3min speed=88161K/sec unused devices: <none> |
#watch /proc/mdstat
|
#watch cat /proc/mdstat
|
#Personalities : [raid1]
![]() md/ md0 |
#fdisk /dev/md0
![]() Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x94d40e71. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 5243120. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) ... Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-5243120, default 5243120): Using default value 5243120 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#watch cat /proc/mdstat
|
#Personalities : [raid1]
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 19G 0 100% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm |
#losetup -d /dev/loop1
![]() ioctl: LOOP_CLR_FD: Device or resource busy |
#losetup -d /dev/loop2
![]() ioctl: LOOP_CLR_FD: Device or resource busy |
#mdadm /dev/md0 -r /dev/loop1
![]() mdadm: hot remove failed for /dev/loop1: Device or resource busy |
#mdadm --stop
![]() mdadm: No devices given. |
#mdadm --stop /dev/md0
mdadm: stopped /dev/md0 |
#losetup -d /dev/loop2
|
#ls -h
Desktop disk1.img disk2.img |
#rm disk*
|
#dd if=/dev/zero of=disk2.img seek=2048 bs=1024k count=1
1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.0028335 s, 370 MB/s |
#losetup /dev/loop2 disk2.img
|
#fdisk /dev/md0
![]() Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x35db5cb6. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 524528. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) ... Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-524528, default 524528): Using default value 524528 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#mkfs.ext3 /dev/md
![]() md/ md0 |
#mkfs.ext3 /dev/md0
mke2fs 1.41.3 (12-Oct-2008) warning: 240 blocks unused. Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 131328 inodes, 524288 blocks 26226 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=536870912 16 block groups 32768 blocks per group, 32768 fragments per group 8208 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 26 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#Personalities : [raid1]
![]() md/ md0 |
#mount /dev/md0 /mnt/
|
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 5.3G 13G 31% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/md0 2.0G 68M 1.9G 4% /mnt |
#ls /mnt/
lost+found |
#file -s /dev/md
![]() md/ md0 |
#file -s /dev/md0
/dev/md0: Linux rev 1.0 ext3 filesystem data, UUID=9541489d-9a04-4f97-8d78-1f48ea023ffc (needs journal recovery) (large files) |
#ls /dev/mapper/
control |
#kpartx -a /dev/md
![]() md/ md0 |
#kpartx -a /dev/md0
|
#ls /dev/mapper/
control |
#fdisk /dev/md0
![]() Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x4ea1c8bc. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 524528. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) ... Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-524528, default 524528): Using default value 524528 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#kpartx -a /dev/md0
device-mapper: reload ioctl failed: Invalid argument |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 5.3G 13G 31% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/md0 2.0G 68M 1.9G 4% /mnt |
#umount /mnt
|
#fdisk /dev/md0
![]() The number of cylinders for this disk is set to 524528. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): d Selected partition 1 Command (m for help): n Command action ... Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-524528, default 524528): Using default value 524528 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#kpartx -a /dev/md0
|
#ls /dev/mapper/
control md0p1 |
#mdadm --stop
![]() mdadm: No devices given. |
#md
![]() md5sum md5sum.textutils mdadm mdadm-startall |
#mdadm --stop
![]() mdadm: No devices given. |
#mdadm --stop /dev/md0
![]() mdadm: fail to stop array /dev/md0: Device or resource busy |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 5.3G 13G 31% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 744K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm |
#mdadm --stop /dev/md0
![]() mdadm: fail to stop array /dev/md0: Device or resource busy |
#mdadm --stop /dev/md0
![]() mdadm: fail to stop array /dev/md0: Device or resource busy |
#mdadm /dev/md0 --stop
|
#ps ax|grep mdadm
7665 ? Ss 0:00 /sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan --syslog 11845 pts/6 R+ 0:00 grep mdadm |
#mkfs.ext3 /dev/mapper/md0p1
mke2fs 1.41.3 (12-Oct-2008) warning: 239 blocks unused. Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 131328 inodes, 524288 blocks 26226 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=536870912 16 block groups 32768 blocks per group, 32768 fragments per group 8208 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mount /dev/mapper/md0p1 /mnt/
|
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 5.3G 13G 31% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 744K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/mapper/md0p1 2.0G 68M 1.9G 4% /mnt |
#mdadm --list
![]() mdadm: unrecognized option `--list' Usage: mdadm --help for help |
#mdadm --help
mdadm is used for building, managing, and monitoring Linux md devices (aka RAID arrays) Usage: mdadm --create device options... Create a new array from unused devices. mdadm --assemble device options... Assemble a previously created array. mdadm --build device options... Create or assemble an array without metadata. mdadm --manage device options... make changes to an existing array. ... Shorthand for --manage. Any parameter that does not start with '-' is treated as a device name or, for --examine-bitmap, a file name. The first such name is often the name of an md device. Subsequent names are often names of component devices. For detailed help on the above major modes use --help after the mode e.g. mdadm --assemble --help For general help on options use mdadm --help-options |
#mdadm --monitor
![]() mdadm: Cannot monitor: need --scan or at least one device |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 2098112 blocks [2/2] [UU] unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 loop2[1] loop1[0] 2098112 blocks [2/2] [UU] unused devices: <none> |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 5.3G 13G 31% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 744K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/mapper/md0p1 2.0G 68M 1.9G 4% /mnt |
#ls /mnt/\
![]() > |
#ls /mnt/
lost+found |
#mdadm /dev/lo
![]() log loop0 loop1 loop2 loop3 loop4 loop5 loop6 loop7 |
#mdadm /dev/md0 -r /dev/loop1
![]() mdadm: hot remove failed for /dev/loop1: Device or resource busy |
#mdadm /dev/md0 -r /dev/loop1
![]() mdadm: hot remove failed for /dev/loop1: Device or resource busy |
#pwd
/home/user |
#dmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.26-2-686 (Debian 2.6.26-21lenny4) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Tue Mar 9 17:35:51 UTC 2010 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) [ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf790000 (usable) [ 0.000000] BIOS-e820: 00000000bf790000 - 00000000bf79e000 (ACPI data) [ 0.000000] BIOS-e820: 00000000bf79e000 - 00000000bf7e0000 (ACPI NVS) ... [16323.109284] md: cannot remove active disk loop1 from md0 ... [16445.651763] raid1: Disk failure on loop1, disabling device. [16445.651763] raid1: Operation continuing on 1 devices. [16445.653316] RAID1 conf printout: [16445.653318] --- wd:1 rd:2 [16445.653320] disk 0, wo:1, o:0, dev:loop1 [16445.653322] disk 1, wo:0, o:1, dev:loop2 [16445.667765] RAID1 conf printout: [16445.667765] --- wd:1 rd:2 [16445.667765] disk 1, wo:0, o:1, dev:loop2 |
#tail -f /var/log/messages
![]() Mar 22 14:45:02 linux4 kernel: [16260.015832] md: cannot remove active disk loop1 from md0 ... Mar 22 14:46:04 linux4 kernel: [16323.109284] md: cannot remove active disk loop1 from md0 ... Mar 22 14:48:06 linux4 kernel: [16445.651763] raid1: Operation continuing on 1 devices. Mar 22 14:48:06 linux4 kernel: [16445.653316] RAID1 conf printout: Mar 22 14:48:06 linux4 kernel: [16445.653318] --- wd:1 rd:2 Mar 22 14:48:06 linux4 kernel: [16445.653320] disk 0, wo:1, o:0, dev:loop1 Mar 22 14:48:06 linux4 kernel: [16445.653322] disk 1, wo:0, o:1, dev:loop2 Mar 22 14:48:06 linux4 kernel: [16445.667765] RAID1 conf printout: Mar 22 14:48:06 linux4 kernel: [16445.667765] --- wd:1 rd:2 Mar 22 14:48:06 linux4 kernel: [16445.667765] disk 1, wo:0, o:1, dev:loop2 ^C |
#losetup /dev/loop3 disk3.img
|
#mdadm --zero-superblock /dev/loop1
![]() mdadm: Couldn't open /dev/loop1 for write - not zeroing |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda2 19G 7.3G 11G 42% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 744K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/mapper/md0p1 2.0G 68M 1.9G 4% /mnt |
#umount /mnt
|
#ps ax|grep mdadm
7665 ? Ss 0:00 /sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan --syslog 12176 pts/6 R+ 0:00 grep mdadm |
#mdadm --stop /dev/md0
mdadm: stopped /dev/md0 |
#mdadm --zero-superblock /dev/loop2
|
#mdadm --zero-superblock /dev/loop3
|
#mdadm -C /dev/md0 --level 5 --raid-devices 3 /dev/loop1 /dev/loop2 /dev/loop3
mdadm: /dev/loop1 appears to contain an ext2fs file system size=2097152K mtime=Mon Mar 22 14:36:03 2010 mdadm: /dev/loop2 appears to contain an ext2fs file system size=2097152K mtime=Mon Mar 22 14:36:03 2010 mdadm: /dev/loop3 appears to contain an ext2fs file system size=2097152K mtime=Mon Mar 22 14:36:03 2010 Continue creating array? y mdadm: array /dev/md0 started. |
#watch cat /proc/mdstat
|
#losetup /dev/loop4 disk4.img
|
#cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] md0 : active raid5 loop4[3](S) loop3[2] loop2[1] loop1[0] 4196224 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU] unused devices: <none> |
#mdadm -f /dev/loop2
mdadm: /dev/loop2 does not appear to be an md device |
#mdadm -f /dev/md0 /dev/loop2
mdadm: set /dev/loop2 faulty in /dev/md0 |
#mdadm /dev/md0 -f /dev/loop2
mdadm: set /dev/loop2 faulty in /dev/md0 |
#cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] md0 : active raid5 loop4[3] loop3[2] loop2[4](F) loop1[0] 4196224 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U] [==============>......] recovery = 74.9% (1572724/2098112) finish=0.2min speed=39488K/sec unused devices: <none> |
#watch cat /proc/mdstat
|
#Personalities : [raid1] [raid6] [raid5] [raid4]
Mar 22 15:06:00 linux4 kernel: [17532.487651] md: recovery of RAID array md0 Mar 22 15:06:00 linux4 kernel: [17532.487655] md: minimum _guaranteed_ speed: 1000 KB/sec/disk. Mar 22 15:06:00 linux4 kernel: [17532.487657] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for recovery. Mar 22 15:06:00 linux4 kernel: [17532.487663] md: using 128k window, over a total of 2098112 blocks. Mar 22 15:06:52 linux4 kernel: [17585.235912] md: md0: recovery done. Mar 22 15:06:52 linux4 kernel: [17585.236270] RAID5 conf printout: Mar 22 15:06:52 linux4 kernel: [17585.236272] --- rd:3 wd:3 Mar 22 15:06:52 linux4 kernel: [17585.236274] disk 0, o:1, dev:loop1 Mar 22 15:06:52 linux4 kernel: [17585.236275] disk 1, o:1, dev:loop4 Mar 22 15:06:52 linux4 kernel: [17585.236277] disk 2, o:1, dev:loop3 ^C |
#mdadm /dev/md0 -a /dev/loop2
mdadm: added /dev/loop2 |
#mdadm -G /dev/md0 --raid-devices=4
mdadm: Need to backup 384K of critical section.. mdadm: ... critical section passed. |
#watch cat /proc/mdstat
|
#Personalities : [raid1] [raid6] [raid5] [raid4]
|
#Personalities : [raid1] [raid6] [raid5] [raid4]
![]() debug/ dev/ |
#echo 200 > /proc/sys/dev/raid/
![]() .bash_history disk2.img .gnome2/ .local/ .tsclient/ .bash_logout disk3.img .gnome2_private/ .metacity/ .update-notifier/ .bash_profile disk4.img .gnupg/ .mozilla/ .Xauthority .bashrc .dmrc .gstreamer-0.10/ .nautilus/ .xsession-errors .dbus/ .gconf/ .ICEauthority .profile Desktop/ .gconfd/ .l3rc .recently-used.xbel disk1.img .gnome/ .lilalo/ .ssh/ |
#echo 200 > /proc/sys/dev/raid/speed_limit_m
speed_limit_max speed_limit_min |
#mdadm --detail --scan
ARRAY /dev/md0 level=raid5 num-devices=4 metadata=00.90 UUID=010d2031:915f3522:3d145199:6d39d4cb |
#cat /etc/mdadm/mdadm.conf
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Mon, 22 Mar 2010 14:19:23 +0200 # by mkconf $Id$ |
#cat /proc/partitions
major minor #blocks name 8 0 488386584 sda 8 1 4883728 sda1 8 2 19535040 sda2 8 3 19535040 sda3 7 1 2098176 loop1 7 2 2098176 loop2 7 3 2098176 loop3 7 4 2098176 loop4 9 0 6294336 md0 |
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Mon, 22 Mar 2010 14:19:23 +0200 # by mkconf $Id$
Personalities : [raid1] [raid6] [raid5] [raid4] md0 : active raid5 loop4[3] loop3[2] loop2[4](F) loop1[0] 4196224 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U] [==============>......] recovery = 74.9% (1572724/2098112) finish=0.2min speed=39488K/sec unused devices: <none>
major minor #blocks name 8 0 488386584 sda 8 1 4883728 sda1 8 2 19535040 sda2 8 3 19535040 sda3 7 1 2098176 loop1 7 2 2098176 loop2 7 3 2098176 loop3 7 4 2098176 loop4 9 0 6294336 md0
Время первой команды журнала | 13:22:21 2010- 3-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:16:54 2010- 3-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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