我正在使用提升。我使用sudo apt-get install. 现在我无法在我的文件系统上找到我的 boost lib 文件。
我想在我的 Qt 项目中包含 lib 的路径。grepping 花费的时间太长了 :( 我在 中找到了包含/usr/include/boost。但我还需要知道库路径。
我意识到这是基本的,但我已经阅读了两页谷歌答案,但仍然不清楚“如何将可执行文件放入/usr/local/bin?”
我已经下载了一个包并将可执行文件称为profit. profit无需path/to/profit每次都添加即可从终端执行命令行的分步命令行是什么?
有没有办法更改文件选择器对话框路径输入?我想自己输入路径而不是单击按钮来指定目标路径。在 Nautilus 中,我可以点击Ctrl+ L, 以显示路径文本框。在将页面另存为对话框中,相同的快捷方式让我命名文本框。
作为参考,我对Linux知之甚少,正在使用它来运行别人编写的程序。说明说Add the executable 'ttt' to the search path. In most installations this can be accomplished by linking the file to the 'bin' subdirectory at user home.
我该怎么做?
此可执行文件当前位于主机区域的子文件夹中,因为它在双引导计算机上运行,我无法改变它是双引导的事实,因为它是一台工作计算机。
这不起作用:
$ ls "~/.wine/drive_c/tools/Family Tree v2.0"
ls: cannot access '~/.wine/drive_c/tools/Family Tree v2.0': No such file or directory
Run Code Online (Sandbox Code Playgroud)
但这确实:
$ ls "/home/daniel/.wine/drive_c/tools/Family Tree v2.0"
Dossiers Dossiers_orig Infos.opt Racines.exe 'Register OCX.bat' racines.CNT
Dossiers-2019.11.03-11.46.tar.gz Html REGSVR32.exe Racines.hlp Uninst.isu readme.txt
Run Code Online (Sandbox Code Playgroud)
鉴于这~应该与 相同/home/daniel,这里发生了什么?
我在开始菜单中有 Firefox,但没有像 Windows 那样的“属性”。
如何确定是否安装了 Firefox 以及如何检查菜单项的链接路径?
假设我有一个名为 .bash 的 bash 文件myBash.bash。它驻留在:
/myDirect/myFolder/myBash.bash
Run Code Online (Sandbox Code Playgroud)
现在我想在脚本中使用字符串/myDirect/myFolder(的位置myBash.bash)。有没有我可以用来找到这个位置的命令?
编辑:这个想法是我想设置一个 zip 文件夹,其中包含可以由该 zip 文件中的 bash 脚本启动的代码。我知道该 zip 文件中代码的相对文件路径,但不知道绝对路径,我需要这些。一种方法是在路径中进行硬编码,或者要求将文件的路径作为变量给出。但是,如果 bash 文件可以自行确定它的位置,然后根据其对 zip 文件结构的了解,创建到另一个文件的相关路径,我会发现它更容易。
我有 USB 设备,它实际上被 Ubuntu 10.04 识别为串行设备。我怎样才能找到它的完整路径?
ls -la /dev/
Run Code Online (Sandbox Code Playgroud)
显示了很多设备。如何选择正确的?
当我无法安装软件时出现了问题,所以我真正地询问 ./ 因为我不知道它并且输出“未找到命令”让我对命令的实际内容感到困惑。
我想安装文件truecrypt-7.2-setup-x86。
说明说使用命令:
sudo ./truecrypt-7.2-setup-x86
Run Code Online (Sandbox Code Playgroud)
但输出是:
sudo: ./truecrypt-7.2-setup-x86: command not found
Run Code Online (Sandbox Code Playgroud)
更新:为了完整起见,在测试中我在文件夹中,但尚未使文件可执行(chmod + x)。
我在 bash 变量中有一个 Windows 路径作为字符串:
file='C:\Users\abcd\Downloads\testingFile.log'
Run Code Online (Sandbox Code Playgroud)
我正在尝试将此路径转换为以/c/Users....
我的尝试
以下工作:
file=${file/C://c}
file=${file//\\//}
echo $file
> /c/Users/abcd/Downloads/testingFile.log
Run Code Online (Sandbox Code Playgroud)
问题
在这里,我为包含文件路径的字符串执行了此操作。我问这个问题的原因是我必须在 Ubuntu 16.04 的 bash 脚本中转换 20 个这样的字符串,每次我这样做时,我必须为每次转换写 2 行 - 它占用了大量空间!
题
有没有办法组合这两个命令
file=${file/C://c}
file=${file//\\//}
Run Code Online (Sandbox Code Playgroud)
成一个命令?
paths ×10
command-line ×5
bash ×3
firefox ×2
boost ×1
devices ×1
executable ×1
libraries ×1
menu ×1
nautilus ×1
scripts ×1
serial-port ×1
sudo ×1