我有几个Stopped
后台进程。
kill $(jobs -p)
并且kill `jobs -p`
没有效果
kill %1
, kill %2
, 等成功终止个别进程
如何使用一个命令杀死每个后台进程?
另外,为什么前两个命令对我不起作用?
我正在运行 Linux Mint 15、64 位
要将文件夹从本地主机传输到远程主机,我通常会执行以下操作:
$ scp -r myFolder user@host:destFolder/
Run Code Online (Sandbox Code Playgroud)
为了让这更容易,我给远程主机目的地取了别名:
$ alias remoteHost user@host:destFolder/
Run Code Online (Sandbox Code Playgroud)
但是,对别名进行 scping 不起作用:
$ scp -r myFolder `remoteHost`
bash: user@host:destFolder/: No such file or directory
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
Run Code Online (Sandbox Code Playgroud) 我正在运行 RHEL5。我将简单的别名命令添加到~/.bashrc
. 当我启动一个新终端时,没有任何反应,但source ~/.bashrc
可以正常工作,所以我知道语法是正确的。我还进行了修改/源代码测试~/.bash_profile
,但它也不会在终端启动时执行。 ~/.bash_login
并且~/.profile
在我的系统上不存在。
这是我的~/.bashrc
# .bashrc
# Source global definitions if [ -f /etc/bashrc ]; then
. /etc/bashrc fi
# User specific aliases and functions
alias hi=hello
Run Code Online (Sandbox Code Playgroud)
和我的~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
Run Code Online (Sandbox Code Playgroud) 我对丢失的文件运行了一个源命令。我忘记了,但后来注意到每次我打开一个新终端时,第一行都是关于丢失文件的警告
bash: /software/intel-composer-2011u5-x86_64/bin/compilervars.sh: No such file or directory
~ $
Run Code Online (Sandbox Code Playgroud)
我如何摆脱这个警告?