uptime
管道sed
修复了第一部分,但内存使用情况如何?top
至少在默认情况下以交互方式运行。
所以:我需要观察使用过的 RAM,不包括机会缓存(一旦需要内存就会被丢弃)。并询问两者,因为我希望一个标准工具可以做到这一点,而不是两个。或者 - 甚至更好 -/proc
指示 RAM 部分的东西。
uptime
管道sed
修复了第一部分,但内存使用情况如何?top
至少在默认情况下以交互方式运行。
所以:我需要观察使用过的 RAM,不包括机会缓存(一旦需要内存就会被丢弃)。并询问两者,因为我希望一个标准工具可以做到这一点,而不是两个。或者 - 甚至更好 -/proc
指示 RAM 部分的东西。
在我将键盘布局切换为西里尔文之后
setxkbmap -layout "us,bg(phonetic)" -option "grp:alt_shift_toggle"
ratpoison
停止识别键并且只识别状态
readkey: Unbound key: Cyrillic_tse
但是,当我切换到终端并按相同的键时,ц
输入的是已绑定的~/.ratpoisonrc
:
# ~/.ratpoisonrc
# Minimal config file for ratpoison.
# Meta key - Windows key.
# Press before command, not simultaneously.
# Basic commands:
# s, S - split screen into "frames"
# <space> - within a frame, cycle the "windows" open inside it
# <tab> - next frame
# c - create a terminal window in the current frame
# r - resize this frame
# o - only frame - destroy all other frames
# R - remove current frame
# Q - quit ratpoison
escape Super_L
unbind Q
bind Q quit
bind o only
set startupmessage 0
bind Я quit
bing о only
bind к kill
bind ц exec xterm
bind с split
bind С hsplit
具有共享 ntfs 驱动器的 Windows10 / debian 系统:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 9.3G 0 part [SWAP]
├─sda2 8:2 0 83.8G 0 part /home
└─sda3 8:3 0 100G 0 part /media/share
nvme0n1 259:0 0 465.8G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part /boot/efi
├─nvme0n1p2 259:2 0 435.7G 0 part
└─nvme0n1p4 259:3 0 27.9G 0 part /
该共享一直运行良好,直到最近它在 linux 部分变为只读。我认为我有适当的驱动程序进行写访问。fstab 中的行:
$ cat /etc/fstab | grep share
UUID=2786FC7C74DF871D /media/share ntfs defaults 0 3
如果我卸载它然后再次安装:
# mount /dev/sda3 share
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only
在 Windows 中,我检查了磁盘是否有错误并对其进行了碎片整理,然后使用了关闭。关闭期间没有开始升级。
如何进行?
$ pip3 install matplotlib
Requirement already satisfied: matplotlib in /home/vorac/.local/lib/python3.7/site-packages (3.0.3)
Requirement already satisfied: cycler>=0.10 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (2.3.0)
Requirement already satisfied: numpy>=1.10.0 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (1.16.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/vorac/.local/lib/python3.7/site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from cycler>=0.10->matplotlib) (1.12.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)
都好。现在:
$ python3
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>>
>>>
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2372, in <module>
switch_backend(rcParams["backend"])
File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/vorac/.local/lib/python3.7/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
诡异的。
$ pip3 install tkinter
Collecting tkinter
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/tkinter/
所述页面实际上只包含文本“404 Not Found”。在这种情况下我该怎么办。我正在尝试将软件包安装到我的本地 $HOME,但系统范围的安装也可以工作。
$ uname -a
Linux laptop 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64 GNU/Linux
我需要使用cv::face::createLBPHFaceRecognizer()
,它不是核心 OpenCV 的一部分,而是一个贡献模块。
$ dpkg -l libopencv-contrib-dev
ii libopencv-contrib-dev:amd64 3.2.0+dfsg-6 amd64 development files for libopencv-contrib3.2
一切都很好......不:
src/cmd.cpp:150: error: ‘cv::face’ has not been declared
const auto model = cv::face::createLBPHFaceRecognizer();
^~~~
好的。然后让我们手动包含所需的标题:
$ dpkg -S libopencv-contrib-dev
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/changelog.Debian.gz
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/copyright
libopencv-contrib-dev:amd64: /usr/share/doc/libopencv-contrib-dev/README.Debian
没有什么!这是打包者的错误吗(毕竟这是 Debian测试)?OpenCV 的特性?我这边的一个小疏忽?我想继续使用包管理器,而不是自己编译整个东西。
所以我们都diff
默认安装了这个命令。我当然不知道如何使用它。但我希望有一些合理的默认用法。但是当我输入时,diff file1 file2
我得到……一个文本……我必须在脑海中解析……这无助于这是两个文本的奇怪组合,而这两个文本本身又非常复杂。
所以我寻找了一个图形解决方案,例如meld
. 开箱即用的效果要好得多。
然而,我更愿意一直呆在命令行上。是否有一个相当标准的命令:
libncurses
vim
于emacs
IDE如果不是,为什么不呢?我看了看,colordiff
但它并没有完全削减它。
我打电话
wpa_supplicant -c"$CONF" -i"$IFACE" -B
其中 $CONF 是一个包含许多network={}
定义的文件。wpa_supplicant
确实连接到范围内的任何一个。
如何查询我的笔记本电脑与哪个 AP 关联?
我尝试添加-dd
和解析输出。我发现的是:
Priority group 1
id=3 ssid='UP-Campus'
Priority group 0
id=0 ssid='Sauron'
id=1 ssid='futurenet'
我可以依靠这个,那个wpa_supplicant
填充肯定连接到'UP-Campus'。
还有一个问题,是否wpa_supplicant
重新连接?如果我走出配置文件中一个单元格的范围并进入另一个单元格的范围,它会重新连接吗?