我正在调试这个引发异常的程序。这使得我的调试器寻找一些源代码,例如../sysdeps/unix/sysv/linux/raise.c- 但未能找到它。
现在,我意识到我没有必要拥有这些资源,但我仍然希望它们在那里。
我正在开发 Devuan Chimaera GNU/Linux 系统。
对我来说,让这些源可用并可由 gdb 定位的最简单的方法是什么?
我正在尝试使用 fzf 来选择并激活不同的虚拟环境。但是,我收到以下错误:
xargs: source: No such file or directory
我的命令包括三个部分:find | fzf | xargs
(1) find 定位我的虚拟环境,
(2) 使用 fzf 选择虚拟环境,
(3) xargs 用于source所选文件。
下面是完整的命令:
find ~/.virtualenvs/ -maxdepth 1 -type d | fzf | xargs -I {} source {}/bin/activate
xargs: source: No such file or directory
我可以直接获取该文件(即命令提示符显示进入 fzf_delete 虚拟环境):
brian:~$ source /home/brian/.virtualenvs/fzf_delete/bin/activate
(fzf_delete) brian:~$
我可以使用 fzf 选择虚拟环境:
find ~/.virtualenvs/ -maxdepth 1 -type d | fzf
/home/brian/.virtualenvs/fzf_delete
我还通过删除对 find 和 fzf 的依赖来将问题隔离到 xargs:
echo "/home/brian/.virtualenvs/fzf_delete" | xargs …
我想查看ps等命令的源代码。似乎不可能在 LXR (linux.no) 中搜索“ps”。我在哪里可以找到它?
我正在寻找某种路由技巧来设置特定的源 IP:
本机有两个IP;
Eth1:192.168.0.1
Eth1:2 192.168.0.2
默认网关是 192.168.0.254 通过 Eth1
远程子网为 10.0.0.0/24
发送到 10.0.0.x 主机的任何流量,我想通过 Eth1:2 离开,以便在远程主机接收到它时具有 IP 192.168.0.2,或者如何强制 192.168.0.2 成为我的源 IP与 10.0.0.x 主机交谈时。
令人尴尬,但是在系统升级之后say它就消失了——要么它不再由发行版提供,要么我之前独立安装了它(但我不记得是如何以及从哪里安装的)。
问题是say词是如此普遍,以至于谷歌搜索在寻找它时是无用的。
因为记录say是很旧的程序,它可以发音给定的文本或将其转换为 SAMPA 表示。可能有替代方案(如 espeak),但我必须得到say.
所以......有人记得/知道什么是网站say吗?
更新:终于找到了。它来自Nick Ing-Simmons 编写的rsynth包。
我被要求查明何时安装了特定版本的软件。我唯一需要做的就是相关目录的修改时间。当我们安装它时,我很难破译:
/opt/pkg/totalview:
drwxr-xr-x. 3 root root 4 Jan 23 2013 8.11.0-0
/opt/pkg/totalview/8.11.0-0:
lrwxrwxrwx. 1 root root 32 Jan 23 2013 bin -> toolworks/totalview.8.11.0-0/bin
drwxrwxr-x. 5 root root 5 Dec 11 2012 toolworks
/opt/pkg/totalview/8.11.0-0/bin:
-r-xr-xr-x. 1 root root 3391 Oct 25 2012 htmlhelp.sh
lrwxrwxrwx. 1 root root 38 Dec 11 2012 memscape -> ../../memoryscape.3.3.0-0/bin/memscape
lrwxrwxrwx. 1 root root 39 Dec 11 2012 memscript -> ../../memoryscape.3.3.0-0/bin/memscript
-r-xr-xr-x. 1 root root 9161 Oct 25 2012 mrnet_commnode
lrwxrwxrwx. 1 root root 3 …Run Code Online (Sandbox Code Playgroud) 我正在创建一个脚本来管理我的点文件,我想~/.bashrc为当前的 bash 自动获取我的文件。
但我发现在我的脚本中写:
source ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
它将仅为脚本的执行提供 .bashrc 文件。由于我的 shell 已经启动,它不会重新加载配置。
你有在脚本调用者 bash 中重新加载文件的解决方案吗?
(如果您认为我没有使用正确的术语,请纠正我)
我在我的笔记本电脑上运行 Ubuntu 14.04。我的笔记本电脑有 USB 相关问题。它有时有效,有时无效。我想自己解决这个问题。所以,我想知道是否有办法确切知道哪个驱动程序负责我的笔记本电脑中的 USB,以及如何在 linux 源代码树中找到该驱动程序的源文件。这是 的回应sudo lspci -v | grep -i usb:
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) (prog-if 30 [XHCI])
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) (prog-if 20 [EHCI])
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) (prog-if 20 [EHCI])
Run Code Online (Sandbox Code Playgroud)
如果有人想知道我确实对在 Linux 内核中破解驱动程序有一点了解。
我在 Linux 2.6.32-openvz-042stab120.11-amd64 OpenVZ 容器上运行 Debian 8.9 Jessie。
我正在尝试使用curlftpfs0.9.1,因为此版本具有在更高版本中删除的功能 - 即 open(read+write) 和 open(write)。
当前版本是0.9.2-9~deb8u1:
apt-cache policy curlftpfs
curlftpfs:
Installed: (none)
Candidate: 0.9.2-9~deb8u1
Version table:
0.9.2-9~deb8u1 0
500 http://ftp.debian.org/debian/ jessie/main amd64 Packages
Run Code Online (Sandbox Code Playgroud)
我能够在 Debian Snapshot 上找到二进制文件和源代码。
但是,如果我尝试安装.deb二进制文件,则会得到未满足的依赖项:
# dpkg -i ./curlftpfs_0.9.1-3_amd64.deb
Selecting previously unselected package curlftpfs.
(Reading database ... 44948 files and directories currently installed.)
Preparing to unpack ./curlftpfs_0.9.1-3_amd64.deb ...
Unpacking curlftpfs (0.9.1-3) ...
dpkg: dependency problems prevent configuration of …Run Code Online (Sandbox Code Playgroud) source ×10
linux ×2
bashrc ×1
command ×1
compiling ×1
debian ×1
debugging ×1
drivers ×1
filesystems ×1
find ×1
fzf ×1
gdb ×1
glibc ×1
ip ×1
kernel ×1
permissions ×1
ps ×1
routing ×1
shell-script ×1
source-code ×1
usb ×1
virtualenv ×1
xargs ×1