[Unix]常用命令

进程的切换:

1) ./server &     进程后台运行

2) jobs   列举jobs

3) 把前台运行的程序放到后台运行

To place a foreground process in the background: suspend the foreground process (with Ctrl-z) then enter the bg command to move the process into the background.

Show the status of all background and suspended jobs: jobs
Bring a job back into the foreground: fg %jobnumber
Bring a job back into the background: bg %jobnumber

4)  ssh登陆远程linux(不用密码):ssh login without password using os x

ssh root@192.168.0.100

5)  远程拷贝

scp config.log root@192.168.0.100:~/log

拷贝目录

scp -r ./log root@192.168.0.100:~/

6) mac 下开启一个新的terminal:

osascript -e 'tell app "Terminal" to do script "cd ${CURDIR}\n pwd\n" ' 

7)结束指定的进程

ps -ef | grep ./server | grep -v grep | awk '{print $2}' | xargs kill -9

8) 修改命令, 把命令xdg-open改名为xopen,并放到/usr/bin目录下,

cd /usr/bin

ln -s xdg-open xopen     

相关参考:

how can i bring the background process to foreground

nohup wiki

make a foreground running process to run background without hang up

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值