/l3/users/slm/2018-12-minsk-aws/student03.BigClassRoom/user :1 :2 :3 :4 :5 :6 :7 |
|
$ssh 172.20.13.183
The authenticity of host '172.20.13.183 (172.20.13.183)' can't be established. [user@instructor:~]$ ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 30:85:a9:9e:10:aa brd ff:ff:ff:ff:ff:ff inet 172.20.13.183/25 brd 172.20.13.255 scope global dynamic enp3s0 valid_lft 690907sec preferred_lft 690907sec inet6 fe80::3285:a9ff:fe9e:10aa/64 scope link valid_lft forever preferred_lft forever [user@instructor:~]$ |
$more /proc/cpuinfo | grep vmx
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm kaiser tpr_shadow vnmi flexpriority dtherm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm kaiser tpr_shadow vnmi flexpriority dtherm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm kaiser tpr_shadow vnmi flexpriority dtherm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm kaiser tpr_shadow vnmi flexpriority dtherm |
$free
total used free shared buff/cache available Mem: 8143996 763552 6602840 159652 777604 6984864 Swap: 8351740 0 8351740 |
$free -m
total used free shared buff/cache available Mem: 7953 744 6448 156 760 6821 Swap: 8155 0 8155 |
$uname -a
Linux m3 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux |
$lspci
00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01) 00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01) 00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01) 00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01) 00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01) 00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) 00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03) |
$su -
Password: root@m3:~# logout |
$vi /etc/sudoers
|
$~
# # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification "/etc/sudoers" [readonly] 27L, 669C ... # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d root@m3:/home/user# exit # User privilege specification root ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d ~ |
$sudo dmidecode
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for user: # dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.5 present. 46 structures occupying 1824 bytes. ... OEM-specific Type Header and Data: 8B 36 2C 00 07 10 22 01 00 00 00 20 04 04 32 55 F8 00 A2 02 A1 00 40 63 43 10 EB 82 03 DF 40 B2 00 20 00 73 3C 10 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 Strings: V1394GUID Handle 0x002D, DMI type 127, 4 bytes End Of Table |
$vi ~/.bashrc
|
$. /etc/bash_completion
|
$sudo dmidecode
# dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.5 present. 46 structures occupying 1824 bytes. Table at 0x000F06D0. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: American Megatrends Inc. Version: 0405 Release Date: 11/22/2010 ... OEM-specific Type Header and Data: 8B 36 2C 00 07 10 22 01 00 00 00 20 04 04 32 55 F8 00 A2 02 A1 00 40 63 43 10 EB 82 03 DF 40 B2 00 20 00 73 3C 10 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 Strings: V1394GUID Handle 0x002D, DMI type 127, 4 bytes End Of Table |
$sudo hd
hd hdparm |
$sudo hd
hd hdparm |
$sudo dmesg | grep sda
[ 0.870747] sd 2:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB) [ 0.870798] sd 2:0:0:0: [sda] Write Protect is off [ 0.870800] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 0.870835] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 0.900172] sda: sda1 sda2 < sda5 > [ 0.900540] sd 2:0:0:0: [sda] Attached SCSI disk [ 1.571465] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 3.759352] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro [ 8.103411] Adding 8351740k swap on /dev/sda5. Priority:-1 extents:1 across:8351740k FS |
$more /proc/partitions
|
$df -H
Filesystem Size Used Avail Use% Mounted on udev 4.2G 0 4.2G 0% /dev tmpfs 834M 19M 816M 3% /run /dev/sda1 306G 4.5G 286G 2% / tmpfs 4.2G 11M 4.2G 1% /dev/shm tmpfs 5.3M 4.1k 5.3M 1% /run/lock tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup tmpfs 834M 17k 834M 1% /run/user/117 tmpfs 834M 46k 834M 1% /run/user/1001 |
$sudo hdparm -tT /dev/sda
/dev/sda: Timing cached reads: 3308 MB in 2.00 seconds = 1655.14 MB/sec Timing buffered disk reads: 292 MB in 3.02 seconds = 96.84 MB/sec |
$sudo hdparm -tT /dev/sda
/dev/sda: Timing cached reads: 3368 MB in 2.00 seconds = 1684.81 MB/sec Timing buffered disk reads: 296 MB in 3.02 seconds = 98.15 MB/sec |
$sudo apt-get install bonnie++
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: bonnie++ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 61.4 kB of archives. After this operation, 187 kB of additional disk space will be used. Get:1 http://ftp.by.debian.org/debian stretch/main amd64 bonnie++ amd64 1.97.3 [61.4 kB] Fetched 61.4 kB in 0s (0 B/s) Selecting previously unselected package bonnie++. (Reading database ... 135960 files and directories currently installed.) Preparing to unpack .../bonnie++_1.97.3_amd64.deb ... Unpacking bonnie++ (1.97.3) ... Setting up bonnie++ (1.97.3) ... Processing triggers for man-db (2.7.6.1-2) ... |
$sudo bonnie++
You must use the "-u" switch when running as root. usage: bonnie++ [-d scratch-dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)]] [-n number-to-stat[:max-size[:min-size][:num-directories[:chunk-size]]]] [-m machine-name] [-r ram-size-in-MiB] [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f] [-b] [-p processes | -y] [-z seed | -Z random-file] [-D] Version: 1.97 |
$man bonnie++
|
$sudo bonnie++ /dev/sda
usage: bonnie++ [-d scratch-dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)]] [-n number-to-stat[:max-size[:min-size][:num-directories[:chunk-size]]]] [-m machine-name] [-r ram-size-in-MiB] [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f] [-b] [-p processes | -y] [-z seed | -Z random-file] [-D] Version: 1.97 |
$sudo bonnie++ -d /dev/sda
Can't change to directory "/dev/sda". usage: bonnie++ [-d scratch-dir] [-c concurrency] [-s size(MiB)[:chunk-size(b)]] [-n number-to-stat[:max-size[:min-size][:num-directories[:chunk-size]]]] [-m machine-name] [-r ram-size-in-MiB] [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f] [-b] [-p processes | -y] [-z seed | -Z random-file] [-D] Version: 1.97 |
$curl cheat.sh/bonnie++
bash: curl: command not found |
$sudo curl cheat.sh/bonnie++
[sudo] password for user: sudo: curl: command not found |
$curl cheat.sh/ls
bash: curl: command not found |
$sudo apt-get install curl
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libcurl3 The following NEW packages will be installed: curl libcurl3 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 519 kB of archives. After this operation, 989 kB of additional disk space will be used. ... (Reading database ... 135979 files and directories currently installed.) Preparing to unpack .../libcurl3_7.52.1-5+deb9u8_amd64.deb ... Unpacking libcurl3:amd64 (7.52.1-5+deb9u8) ... Selecting previously unselected package curl. Preparing to unpack .../curl_7.52.1-5+deb9u8_amd64.deb ... Unpacking curl (7.52.1-5+deb9u8) ... Setting up libcurl3:amd64 (7.52.1-5+deb9u8) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up curl (7.52.1-5+deb9u8) ... |
$sudo curl cheat.sh/bonnie
# Bonnie++ # disk and file system benchmarking tool for measuring I/O performance # benchmark disk mounted at /tmp/; use `user` for that # skip per char IO test (-f) # no write buffering (-b) bonnie++ -d /tmp -s 16000M -n 0 -m TEST -f -b -u user |
$curl wttr.in?3n
Weather report: Minsk, Belarus Overcast .--. -12--5 °C .-( ). ← 22 km/h (___.__)__) 7 km 0.3 mm ┌─────────────┐ ┌───────────────────────┤ Mon 17 Dec ├───────────────────────┐ │ Noon └──────┬──────┘ Night │ ├──────────────────────────────┼──────────────────────────────┤ ... ┌───────────────────────┤ Wed 19 Dec ├───────────────────────┐ │ Noon └──────┬──────┘ Night │ ├──────────────────────────────┼──────────────────────────────┤ │ _`/"".-. Light snow │ Freezing fog │ │ ,\_( ). -8--6 °C │ _ - _ - _ - -14--12 °C │ │ /(___(__) ↖ 5-7 km/h │ _ - _ - _ ← 6-12 km/h │ │ * * * 20 km │ _ - _ - _ - 20 km │ │ * * * 0.0 mm | 0% │ 0.0 mm | 0% │ └──────────────────────────────┴──────────────────────────────┘ Follow @igor_chubin for wttr.in updates |
$curl weather.com
|
$pwd
/home/user |
$ls -la
total 96 drwxr-xr-x 17 user user 4096 Dec 17 12:41 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. -rw-r--r-- 1 user user 220 May 15 2017 .bash_logout -rw-r--r-- 1 user root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 user user 636 Dec 17 12:41 .bashrc drwx------ 7 user user 4096 Dec 17 12:22 .cache drwx------ 9 user user 4096 Dec 17 12:15 .config drwxr-xr-x 2 user user 4096 Dec 17 12:15 Desktop drwxr-xr-x 2 user user 4096 Dec 17 12:15 Documents ... drwxr-xr-x 3 user user 4096 Dec 17 12:15 .local drwx------ 5 user user 4096 Dec 17 12:18 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public drwx------ 2 user user 4096 Dec 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 1013 Dec 17 12:41 .viminfo |
$touch V.json
|
$vi V.json
|
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 |
> ^C |
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 |
> jq '.[] | .name +" " + .surname' bash: jq: command not found (23) Failed writing body |
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 | jq '.[] | .name +" " + .surname'
bash: jq: command not found (23) Failed writing body |
$sudo apt-get install jq
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libjq1 libonig4 The following NEW packages will be installed: jq libjq1 libonig4 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 327 kB of archives. After this operation, 1,157 kB of additional disk space will be used. ... Preparing to unpack .../libjq1_1.5+dfsg-1.3_amd64.deb ... Unpacking libjq1:amd64 (1.5+dfsg-1.3) ... Selecting previously unselected package jq. Preparing to unpack .../jq_1.5+dfsg-1.3_amd64.deb ... Unpacking jq (1.5+dfsg-1.3) ... Setting up libonig4:amd64 (6.1.3-2) ... Setting up libjq1:amd64 (1.5+dfsg-1.3) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up jq (1.5+dfsg-1.3) ... |
$sudo curl -s https://uinames.com/api/?region=ukraine\&amount=5 | jq '.[] | .name +" " + .surname'
"Ð ycлан ÐÑиÑенко" "СвÑÑлана ÐеÑдев" "Ð "Ðанна ÐалиÑÑкий" "Ð |
$sudo curl -s https://uinames.com/api/?region=belarus\&amount=5 | jq '.[] | .name +" " + .surname'
jq: error (at <stdin>:0): Cannot index string with string "surname" |
$sudo curl -s https://uinames.com/api/?region=ukraine\&amount=5 | jq '.[] | .name +" " + .surname'
"Ярослава Довженко" "Віра Бабіак" "Сніжана Бондаренко" "Рycлана Беленко" "Рycлан Жердев" |
$sudo curl -s https://uinames.com/api/?region=russia\&amount=5 | jq '.[] | .name +" " + .surname'
"Артур Чистяков" "Егор Черкашин" "Зина Щегловa" "Вера Евдокимовa" "Екатерина Ульяновa" |
$sudo curl -s https://uinames.com/api/?region=belarus\&amount=5 | jq '.[] | .name +" " + .surname'
jq: error (at <stdin>:0): Cannot index string with string "surname" |
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 ||
> jq '.[] | .name +" " + .surname' |
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 || jq '.[] | .name +" " + .surname'
|
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 || jq '.[]
> e > bash: unexpected EOF while looking for matching `'' bash: syntax error: unexpected end of file |
$curl -s https://uinames.com/api/?region=ukraine\&amount=5 || jq '.[]
e | .name +" " + .surname' > bash: unexpected EOF while looking for matching `'' bash: syntax error: unexpected end of file |
$pwd
/home/user |
$touch github.txt
|
$vi github.txt
|
$cat github.txt
ValeryBarai |
$sudo gi
gifmaker gimp gimp-console gio gipddecode giftopnm gimp-2.8 gimp-console-2.8 gio-querymodules |
$sudo gi
gifmaker gimp gimp-console gio gipddecode giftopnm gimp-2.8 gimp-console-2.8 gio-querymodules |
$sudo apt-get install git-core
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: git git-man liberror-perl rsync Suggested packages: git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn The following NEW packages will be installed: git git-core git-man liberror-perl rsync ... Preparing to unpack .../rsync_3.1.2-1+deb9u1_amd64.deb ... Unpacking rsync (3.1.2-1+deb9u1) ... Setting up git-man (1:2.11.0-3+deb9u4) ... Setting up liberror-perl (0.17024-1) ... Setting up rsync (3.1.2-1+deb9u1) ... Created symlink /etc/systemd/system/multi-user.target.wants/rsync.service → /lib/systemd/system/rsync.service. Processing triggers for systemd (232-25+deb9u6) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up git (1:2.11.0-3+deb9u4) ... Setting up git-core (1:2.11.0-3+deb9u4) ... |
$sudo git
git git-receive-pack git-shell git-upload-archive git-upload-pack |
$sudo git https://github.com/ValeryBarai/AWS.git
git: 'https://github.com/ValeryBarai/AWS.git' is not a git command. See 'git --help'. |
$sudo git /ValeryBarai/AWS.git
git: '/ValeryBarai/AWS.git' is not a git command. See 'git --help'. |
$git --help
usage: git [--version] [--help] [-C <path>] [-c name=value] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one work on the current change (see also: git help everyday) ... merge Join two or more development histories together rebase Reapply commits on top of another base tip tag Create, list, delete or verify a tag object signed with GPG collaborate (see also: git help workflows) fetch Download objects and refs from another repository pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help <command>' or 'git help <concept>' to read about a specific subcommand or concept. |
$AWS/.git/
branches/ hooks/ info/ objects/ refs/ |
$AWS/
bash: AWS/: Is a directory |
$AWS/.git/
bash: AWS/.git/: Is a directory |
$cd AWS/.git/
|
$ls -la
total 40 drwxr-xr-x 7 root root 4096 Dec 17 15:59 . drwxr-xr-x 3 root root 4096 Dec 17 15:59 .. drwxr-xr-x 2 root root 4096 Dec 17 15:59 branches -rw-r--r-- 1 root root 263 Dec 17 15:59 config -rw-r--r-- 1 root root 73 Dec 17 15:59 description -rw-r--r-- 1 root root 23 Dec 17 15:59 HEAD drwxr-xr-x 2 root root 4096 Dec 17 15:59 hooks drwxr-xr-x 2 root root 4096 Dec 17 15:59 info drwxr-xr-x 4 root root 4096 Dec 17 15:59 objects drwxr-xr-x 4 root root 4096 Dec 17 15:59 refs |
$pwd
/home/user/AWS/.git |
$cd ..
|
$ls -la
total 12 drwxr-xr-x 3 root root 4096 Dec 17 15:59 . drwxr-xr-x 18 user user 4096 Dec 17 15:59 .. drwxr-xr-x 7 root root 4096 Dec 17 15:59 .git |
$touch hello.md
touch: cannot touch 'hello.md': Permission denied |
$sudo touch hello.md
|
$vi hello.md
|
$sudo git status
On branch master Initial commit Untracked files: (use "git add <file>..." to include in what will be committed) hello.md nothing added to commit but untracked files present (use "git add" to track) |
$sudo git status
On branch master Initial commit Untracked files: (use "git add <file>..." to include in what will be committed) hello.md nothing added to commit but untracked files present (use "git add" to track) |
$sudo git add hello.md
|
$sudo git status
On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: hello.md |
$sudo git commit -m 'added hello.md file' hello.md
[master (root-commit) 64d9c3d] added hello.md file Committer: root <root@m3.class.sl> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file: git config --global --edit After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 1 file changed, 3 insertions(+) create mode 100644 hello.md |
$git commit -m 'added hello.md file' hello.md
fatal: Unable to create '/home/user/AWS/.git/index.lock': Permission denied |
$sudo git log
commit 64d9c3d6b2ad66c41e705c254c83519684db34d7 Author: root <root@m3.class.sl> Date: Mon Dec 17 16:13:45 2018 +0300 added hello.md file |
$sudo git push
Username for 'https://github.com': ValeryBarai Password for 'https://ValeryBarai@github.com': Counting objects: 3, done. Writing objects: 100% (3/3), 227 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/ValeryBarai/AWS.git * [new branch] master -> master |
$sudo git status
On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean |
$ls -la
total 16 drwxr-xr-x 3 root root 4096 Dec 17 16:07 . drwxr-xr-x 18 user user 4096 Dec 17 16:06 .. drwxr-xr-x 8 root root 4096 Dec 17 16:18 .git -rw-r--r-- 1 root root 26 Dec 17 16:06 hello.md |
$sudo ch
chacl chardetect chattr chfn chown chrt chage chardetect3 chcon chgpasswd chpasswd chsh chardet chartread chcpu chgrp chrome-gnome-shell chvt chardet3 chat cheese chmod chroot |
$sudo chown -R user:user
chown: missing operand after ‘user:user’ Try 'chown --help' for more information. |
$sudo chown -R user:user .
|
$git pull
remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done. From https://github.com/ValeryBarai/AWS 64d9c3d..850da4a master -> origin/master Updating 64d9c3d..850da4a Fast-forward hello.md | 4 ++++ 1 file changed, 4 insertions(+) |
$ls -la
total 16 drwxr-xr-x 3 user user 4096 Dec 17 16:28 . drwxr-xr-x 18 user user 4096 Dec 17 16:06 .. drwxr-xr-x 8 user user 4096 Dec 17 16:28 .git -rw-r--r-- 1 user user 55 Dec 17 16:28 hello.md |
$more hello.md
|
$git diff
diff --git a/hello.md b/hello.md index 094f4fe..e1e96ce 100644 --- a/hello.md +++ b/hello.md @@ -1,7 +1,11 @@ +## Introduction + +Introduction + ## Hello Hello *Tatiana* ## Goodbye -Goodbye Tatiana +Goodbye *Tatiana* |
$git diff
diff --git a/hello.md b/hello.md index 094f4fe..e1e96ce 100644 --- a/hello.md +++ b/hello.md @@ -1,7 +1,11 @@ +## Introduction + +Introduction + ## Hello Hello *Tatiana* ## Goodbye -Goodbye Tatiana +Goodbye *Tatiana* |
$git status
On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: hello.md no changes added to commit (use "git add" and/or "git commit -a") |
$git add -p
diff --git a/hello.md b/hello.md index 094f4fe..e1e96ce 100644 --- a/hello.md +++ b/hello.md @@ -1,7 +1,11 @@ +## Introduction + +Introduction + ## Hello ... Hello *Tatiana* ## Goodbye Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? n @@ -1,7 +5,7 @@ ## Hello Hello *Tatiana* ## Goodbye -Goodbye Tatiana +Goodbye *Tatiana* Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y |
$git status
On branch master Your branch is up-to-date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: hello.md Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: hello.md |
$git diff
diff --git a/hello.md b/hello.md index f100f03..e1e96ce 100644 --- a/hello.md +++ b/hello.md @@ -1,3 +1,7 @@ +## Introduction + +Introduction + ## Hello Hello *Tatiana* |
$git commit -m 'bug fixing #1'
*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <(null)>) not allowed |
$git config --global user.name "ValeryBarai"
|
$git status
On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: hello.md no changes added to commit (use "git add" and/or "git commit -a") |
$git add -p
diff --git a/hello.md b/hello.md index f100f03..e1e96ce 100644 --- a/hello.md +++ b/hello.md @@ -1,3 +1,7 @@ +## Introduction + +Introduction + ## Hello Hello *Tatiana* Stage this hunk [y,n,q,a,d,/,e,?]? y |
ValeryBarai
Время первой команды журнала | 10:16:18 2018-12-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:51:55 2018-12-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.81 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.59 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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