启用交换空间 swap 分区
dd if=/dev/zero of=/swapfile bs=1024k count=8192
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
# 设备是否存在、挂载点是否有效、文件系统、挂载参数、语法错误,输出详细日志
findmnt --verify --verbose
清理2周前的 systemd-journald 日志
# 日志位于:/var/log/journal
journalctl --vacuum-time=2weeks
scp 时排除...
标签为 linux 的文章:
两种方式:
[upall@server ~]$ command &
[upall@server ~]$ nohup command &
第一种在关掉终端后命令也会跟着退出,第二种在关掉终端后命令不会退出。
在后台执行的进程,其父进程还是当前终端shell的进程,一旦父进程退出,则会发送hangup信号给所有子进程,子进程收到hangup以后也会退出。如果我们要在退出shell的时候继续运行进程,则需要使用nohup忽略hangup信号,nohup就是不挂起的意思( no hang ...
说明:
修改 /var/www 中所有目录的权限为755,文件除外。
代码:
find /var/www -type d -print0 | xargs -0 chmod 755
# 以上代码摘自 seamonkey 在这里的回复:
# http://www.linuxsir.org/bbs/thread259958.html
<完>
说明:
wget 是个不错的下载工具,可惜不知道怎么使用断点续传功能(貌似没有这功能)。axel 可以继点续传,喜欢的朋友可以试试。
安装:
[upall@local ~]# wget http://soft.shangpan.com/linux/axel-2.4.tar.gz
[upall@local ~]# tar zxvf axel-2.4.tar.gz
[upall@local ~]# cd axel-2.4
[upall@local ~]# ./configure
[upall@local ~]# make && make install
用法:
[upall...