在 git 存储库中工作时,我正在使用本指南在 gnome 终端(Ubuntu 15.10)中显示分支名称。基于以上内容,我现在在 ~/.bashrc 文件中有以下内容:
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
Run Code Online (Sandbox Code Playgroud)
...
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 20.10 上使用 Pinta 1.7。
当我创建文本并完成它时,我无法再编辑我创建的文本或移动它。如果我尝试编辑它,它只会将新文本写入现有文本之上。
那么如何编辑我创建的现有文本或将其移动到另一个位置?
这:
https://www.pinta-project.com/user-guide/text/
不涵盖此用例。
据我了解,www-data用户是拥有 apache 服务的用户。
从/etc/passwd我有的文件:
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
Run Code Online (Sandbox Code Playgroud)
所以www-data的主目录是:/var/www但如果我检查该文件夹的权限,我会得到:
/var/www $ ll
total 12
drwxr-xr-x 3 root root 4096 Mar 20 19:42 ./
drwxr-xr-x 12 root root 4096 Mar 20 19:42 ../
drwxr-xr-x 2 root root 4096 Mar 20 19:42 html/
Run Code Online (Sandbox Code Playgroud)
所以看起来root拥有该文件夹。为什么拥有/var/www目录(其主目录)的不是www-data用户?
我已经在 ubuntu 15.10 上安装了 Jenkins。在 shell 构建步骤中,我试图创建一个 Python 虚拟环境并激活它:

但是当我运行作业时出现以下错误:
/tmp/hudson4515625893361069094.sh: 9: /tmp/hudson4515625893361069094.sh: source: not found
Run Code Online (Sandbox Code Playgroud)
更多来自日志:
[django-demo] $ /bin/sh -xe /tmp/hudson4515625893361069094.sh
+ virtualenv --no-site-packages virtual_django
New python executable in virtual_django/bin/python2
Also creating executable in virtual_django/bin/python
Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/bin/python2
+ cd virtual_django/bin
+ pwd
/var/lib/jenkins/workspace/django-demo/virtual_django/bin
+ dir
activate activate.fish easy_install pip pip2.7 python2
activate.csh activate_this.py easy_install-2.7 pip2 python python2.7
+ source activate
/tmp/hudson4515625893361069094.sh: 9: /tmp/hudson4515625893361069094.sh: source: not found
Build step 'Execute shell' marked build as …Run Code Online (Sandbox Code Playgroud)