我正在尝试识别嵌入式 Linux 发行版。以下是我到目前为止输入的命令:
$ uname -a
Linux LIN-SRV-EMB01 3.10.105 #25556 SMP Sat Aug 28 02:14:22 CST 2021 x86_64 GNU/Linux synology_bromolow_rs3412rpxs
$ lsb_release
-sh: lsb_release: command not found
$ ls /usr/lib/os-release
ls: cannot access /usr/lib/os-release: No such file or directory
$ cat /proc/version
Linux version 3.10.105 (root@build1) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP Sat Aug 28 02:14:22 CST 2021
$ cat /proc/cmdline
root=/dev/md0 netif_seq=2130 ahci=0 SataPortMap=34443 DiskIdxMap=03060e0a00 SataLedSpecial=1 ihd_num=0 netif_num=4 syno_hw_version=RS3412rpxs macs=001132109b1e,001132109b1f,001132109b20,001132109b21 sn=LDKKN90098
$ dmesg | grep …
Run Code Online (Sandbox Code Playgroud) 我不小心杀死了我的ssh-agent
,如何重新启动它而不必重新连接?
我试过这个,但它不起作用:
$ eval $(ssh-agent -s)
Agent pid 8055
Run Code Online (Sandbox Code Playgroud)
然后,我从上一个终端窗口中使用 CTRL+SHIFT+N 打开一个新的 Gnome 终端并输入:
$ ssh-add
Could not open a connection to your authentication agent.
Run Code Online (Sandbox Code Playgroud)
但是,如果我通过键入以下内容从我的第一个 Gnome 终端打开一个新的 Gnome 终端:
$ gnome-terminal &
Run Code Online (Sandbox Code Playgroud)
那么这个新窗口就可以连接到ssh-agent
.
难道我的所有 Gnome 终端都可以“看到”ssh-agent
而不必重新连接到 PC/服务器?
我无法在我的 Ubuntu 上安装 Pepperflashplugin-nonfree :
$ sudo apt install pepperflashplugin-nonfree
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
ttf-dejavu ttf-xfree86-nonfree
The following NEW packages will be installed:
pepperflashplugin-nonfree
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11,1 kB of archives.
After this operation, 70,7 kB of additional disk space will be used.
Selecting previously unselected package pepperflashplugin-nonfree.
(Reading database ... 603638 files and directories currently installed.)
Preparing …
Run Code Online (Sandbox Code Playgroud) 我在 tty2 上有一个 bash 会话和一个ssh-agent
属于我的进程(相同的用户 ID)来自上一个会话(TTY = ?)
在 tty2 上,ssh-add
说:
Could not open a connection to your authentication agent.
我eval $(ssh-agent)
每次登录时都必须启动ssh-agent
吗,即使已经有一个进程在运行?但是最后,我将ssh-agent
运行许多流程实例:-(
编辑:我想使用我已经在运行的ssh-agent
进程。
我找到了一种联系我已经在运行的方法ssh-agent
:
export SSH_AUTH_SOCK=$(find /tmp/ssh-*/ -user $USER -type s -name "agent.*" 2>/dev/null | head -1)
export SSH_AGENT_PID=$(echo $SSH_AUTH_SOCK | cut -d. -f2)
Run Code Online (Sandbox Code Playgroud)
但我不确定这是否非常安全。
编辑 2:每次我运行此命令时,该命令都会eval $(ssh-agent)
启动一个新的ssh-agent
进程实例:-(
我的“~/.stack”目录占用了 2.5GB 并且有以下主要的大目录:
1330 programs/
877 indices/
264 snapshots/
Run Code Online (Sandbox Code Playgroud)
这个“~/.stack”目录是什么?
我可以安全地删除其中最大的文件吗?
我想将包含的字符串分配$value
给多个变量。
实际上,我之前给出的示例 ( var1=var2=...=$value
) 并没有准确反映我想要的内容。到目前为止,我发现了这一点,但它仅适用$value
于整数:
$ let varT=varz=var3=$value
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?
我试图将“sox”实用程序放在两个管道命令中,以将单声道 44kHz 音频文件重新采样为 16kHz 音频文件。
它适用于单个管道:
$ speexdec toto.oga - | sox -V -t raw -b 16 -e signed -c 1 -r 44.1k - -r 16k toto.wav
Run Code Online (Sandbox Code Playgroud)
但是当我添加另一个管道时,sox 实用程序会抱怨:
$ speexdec toto.oga - | sox -V -t raw -b 16 -e signed -c 1 -r 44.1k - -r 16k - | cat - > toto.wav
sox FAIL formats: can't determine type of `-'
Run Code Online (Sandbox Code Playgroud)
任何的想法 ?
我已将 A4R 纸张扫描为 2048x1443 jpg 文件。
EDIT1:它已经旋转为横向(2048x1443)。编辑结束 1
现在,如果我尝试使用此命令转换它:
$ convert -page A4R A4R_Scanned.jpg A4R_Scanned.pdf
$ echo $?
0
Run Code Online (Sandbox Code Playgroud)
EDIT2:没有关于 A4R 参数的错误消息。编辑结束2
我收到一封空白的美国信件,肖像页:
$ identify A4R_Scanned.pdf
**** Warning: File has an empty MediaBox. Using the current page size instead.
Output may be incorrect.
**** Warning: File has an empty MediaBox. Using the current page size instead.
Output may be incorrect.
A4R_Scanned.pdf PDF 595x842 595x842+0+0 16-bit Bilevel DirectClass 63.2K
Run Code Online (Sandbox Code Playgroud)
EDIT3:我尝试了另一种解决方案:
$ convert -page A4 -rotate 90 A4R_Scanned.jpg A4R_Scanned2A4.pdf
Run Code Online (Sandbox Code Playgroud)
这提供了令人满意的 A4 文档,没有明显的质量损失,但我需要将其旋转回 …