nohup

[不指定 2015/10/10 18:23 | by Totti ]
1.nohup 命令
nohup
  nohup 命令
  用途:LINUX命令用法,不挂断地运行命令。
  语法:nohup Command [ Arg ... ] [ & ]
  描述:nohup 命令运行由 Command 参数和任何相关的 Arg 参数指定的命令,忽略所有挂断(SIGHUP)信号。在注销后使用 nohup 命令运行后台中的程序。要运行后台中的 nohup 命令,添加 & ( 表示“and”的符号)到命令的尾部。
  如果不将 nohup 命令的输出重定向,输出将附加到当前目录的 nohup.out 文件中。如果当前目录的 nohup.out 文件不可写,输出重定向到 $HOME/nohup.out 文件中。如果没有文件能创建或打开以用于追加,那么 Command 参数指定的命令不可调用。如果标准错误是一个终端,那么把指定的命令写给标准错误的所有输出作为标准输出重定向到相同的文件描述符。
  退出状态:该命令返回下列出口值:
  126 可以查找但不能调用 Command 参数指定的命令。
  127 nohup 命令发生错误或不能查找由 Command 参数指定的命令。
  否则,nohup 命令的退出状态是 Command 参数指定命令的退出状态。
  nohup命令及其输出文件
  nohup命令:如果你正在运行一个进程,而且你觉得在退出帐户时该进程还不会结束,那么可以使用nohup命令。该命令可以在你退出帐户/关闭终端之后继续运行相应的进程。nohup就是不挂起的意思( n ohang up)。
  该命令的一般形式为:nohup command &
  使用nohup命令提交作业
  如果使用nohup命令提交作业,那么在缺省情况下该作业的所有输出都被重定向到一个名为nohup.out的文件中,除非另外指定了输出文件:
  nohup command > myout.file 2>&1 &
  在上面的例子中,输出被重定向到myout.file文件中。
  使用 jobs 查看任务。
  使用 fg %n 关闭。
  另外有两个常用的ftp工具ncftpget和ncftpput,可以实现后台的ftp上传和下载,这样我就可以利用这些命令在后台上传和下载文件了。



2.程序在后台运行 & 开机启动
nohup python yourscript.py &可以让你的程序在后台运行,控制台输出导向nohup.out文件

nohup python server.py

Var目录空间满了

[不指定 2014/12/02 21:15 | by Totti ]
进入var,命令du -sh * 查看哪个文件夹占用空间,找到那个异常的文件,删除。

directadmin 升级 apache

[不指定 2014/06/14 00:27 | by Totti ]
You can check the current version of apache by running
/usr/sbin/httpd -v




CustomBuild - current

If you're using custombuild (as most new boxes are), run the following
cd /usr/local/directadmin/custombuild
./build update
./build apache
./build php n
./build rewrite_confs


from:http://help.directadmin.com/item.php?id=1

http://www.wdlinux.cn/old/mod_evasive
http://ljty11.blog.163.com/blog/static/10919414120111126105539342/

http://lxy.me/the-centos-next-script-php-ddos-and-prevention.html

http://www.tianji.me/index.php/centos/114.html

http://forum.bnxb.com/read.php?tid=183
可以试试更换其他USB接口安装
点击在新窗口中浏览此图片

禁用Apache空主机头

[不指定 2013/05/31 11:12 | by Totti ]
编辑配置文件,在你的站点配置之前再增加一个站点
NameVirtualHost *

ServerAdmin yourmail#mail.com
DocumentRoot /error
ServerName abc.com

安卓刷机不能进系统

[不指定 2013/04/12 11:03 | by Totti ]
S-ON 手动刷boot.img

fastboot flash boot boot.img
解决办法 把下面的注册表信息 存成这册表文件 然后导入即可

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Manage]
@=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
79,00,63,00,6f,00,6d,00,70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,\
00,34,00,30,00,30,00,00,00
"MUIVerb"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,\
6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
00,6d,00,79,00,63,00,6f,00,6d,00,70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,\
2c,00,2d,00,34,00,30,00,30,00,00,00
"SuppressionPolicy"=dword:4000003c
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Manage\command]
@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,73,\
00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,63,00,2e,00,65,00,78,00,\
65,00,20,00,2f,00,73,00,20,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6f,00,\
6d,00,70,00,6d,00,67,00,6d,00,74,00,2e,00,6d,00,73,00,63,00,00,00
分页: 4/171 第一页 上页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]