可以修改/etc/issue、/etc/motd这两个文件。在终端(tty1-tty6)登陆后会显示指定字串。
“/etc/issue”中可以使用的“变量”:
\d 本地端时间的日期;
\l 显示第几个终端机介面;
\m 显示硬体的等级 (i386/i486/i586/i686…);
\n 显示主机的网路名称;
\o 显示 domain name;
\r 作业系统的版本 (相当于 uname -r)
\t 显示本地端时间的时间;
\s 作业系统的名称;
\v 作业系统的版本。
如果你想在使用者进去的时候显...
分类为 操作系统 的文章:
命令:
[root@localhost ~]# yum install setuptool ntsysv system-config-network
解释:
setuptool 貌似是setup工具本身,安装后自带了一个Authentication configuration。
ntsysv 管理服务的
system-config-network 安装网络配置
mod_bandwidth : Configuration
Global configuration directives :
BandWidthDataDirSyntax : BandWidthDataDir <directory>
Default : “/tmp/apachebw”
Context : server config
Sets the name of the root directory used by mod_bandwidth to store its internal temporary information. Don’t forget to create the needed directories : <directory>/master and <directory>/lin...
$ vnstat --help
vnStat 1.11 by Teemu Toivola
-q, --query query database
-h, --hours show hours
-d, --days show days
-m, --months show months
-w, --weeks show weeks
-t, --top10 show top10
-s, --short use short output
-u, --update up...
如下下载别人的DedeCMS网站模板?
查看网站首页源代码可以找到模板路径:
<link href="/templets/default/style/index.css" type="text/css"/>
之后通过工具下载对应的 list_article.htm、article_image.htm 等文件就可以了:
如何防止别人下载自己的模板?
在 templets 目录中放一个“.htaccess”文件,内容如下:
RewriteEngine on
RewriteRule .(htm|html|inc) / [R,NC,L]
将这个文...
说明:
本地不需要登录服务器只需要一条命令即可管理远程服务器站点,管理项目包括:添加apache站点(含ftp、mysql)、停用站点、恢复站点、删除站点、查看用户配额、查看域名whois信息、查找站点绝对路径。
用法:
SiteRemoteManagerTool by upall.cn Ver20121107
用法: st option xxxx.xx
参数:
site: 添加一个apache站点(含复制代码、FTP、MySQL)
psite: 添加一个反向代理站点(用于免备案)
remove...
说明:
找回快速启动栏中不小心删除了的“显示桌面”按钮。
造好的“显示桌面”按钮
XP的显示桌面按钮
操作:
第一步:制作“显示桌面”的按钮:
在记事本里输入以下内容后保存的“显示桌面.scf”。
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
第二步:放置“显示桌面.scf”到这个位置:
C:\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Qu...
代码:
$vi ~/.vimrc
let &termencoding=&encoding
set fileencodings=utf-8,gbk
$:wq
命令:
#启用休眠:
pwoercfg -h on
#关闭休眠:
pwoercfg -h off
#查看是否启用休眠:
pwoercfg -a
休眠计算机:
shutdown -h
<完>
编辑 ~/.bashrc 添加以下代码:
export LC_TIME=”zh_CN.UTF-8″ #使用中国人的方式显示日期
alias date=’date -d today +”%Y年 %m月 %d日 %A %H:%M:%S %Z”‘ #格式化date命令的格式
说明:
logwatch 邮件中 httpd 部分的显示通常会是下边的样子,但是服务器上有N多个网站、网站的目录名称相同的也很多,将其对应到相应的网站上将会耗费大量时间。
Requests with error response codes
400 Bad Request
/: 5 Time(s)
/100117/small/2012051116812204yGwm.jpg: 1 Time(s)
/customer/uploadfile/1324/1324_201203251308211pYHL.JPG: 1 Time(s)
/customer/uploadfile/1324...
#!/bin/bash
# 说明:站点添加工具[独立代码、数据库]
# 日期:2012-03-31 22:31:21 [6]
# 用法: x dn.ext
# 补充:mpm-itk、vsftpd、mysql
# 需要手动删除mysql数据库、vsftpd用户
# buildhttpdpwd buildmysqlpwd 用于根据域名计算密码
# 作者:/
# 显示帮助
if [ -z "$1" ]; then
echo " Usage: `basename $0` domainName comment"
exit
fi
cd /root...