1.uptime命令
输出:16:11:40 up 59 days, 4:21, 2 users, load average: 0.00, 0.01, 0.00
2.查看/proc/uptime文件计算系统启动时间
cat /proc/uptime
输出: 5113396.94 575949.85
第一数字即是系统已运行的时间5113396.94 秒,运用系统工具date即可算出系统启动时间
- 代码: 全选
date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
输出: 2008-11-09 11:50:31
3.查看/proc/uptime文件计算系统运行时间
- 代码: 全选
cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'
输出:系统已运行:59天4时13分9秒
不用命令,该从那个文件里查看系统启动时间呢
转自:http://bbs.freesinno.com/viewtopic.php?t=66
Linux, linux命令
修改modprobe.d/aliases
chtsamba:/home# vi /etc/modprobe.d/aliases
# alias net-pf-10 ipv6
alias net-pf-10 off
alias ipv6 off
不会再出现ipv6了.
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 192.168.0.200:22 192.168.0.123:1869 ESTABLISHED
ipv6, Linux
berrysoft, blackberry一 7th,2010ptubuntu
本人没有操作过.如你有需要自行操作.
debugfs是linux系统自带的一个文件恢复工具,它可以恢复ext2文件系统的文件,但不能恢复ext3文件系统的文件,下面以一个实例来讲解debugfs恢复文件的方法。
首先增加一个虚拟硬盘,分区,格式化(mkfs.ext2),挂载分区。虚拟机环境实现。
实验分区为/dev/sdb2 ,创建分区步骤省略。
[root@oracledb ~]# mkfs.ext2 /dev/sdb2
新建一个目录,挂载上去
[root@oracledb /]# mkdir guazai
[root@oracledb /]# mount /dev/sdb2 /guazai
新建一个文件,vi file.txt 随便写点内容即可。
ext2, ext3, Linux, mkfs
berrynews, blackberry, 手机十二 29th,2009ptubuntu
The year is 1999. Bill Clinton is the President of the United States, gas is 94 cents a gallon, Bondi Blue iMacs are a staple in dorm rooms across the country, and Microsoft is trying to bring the desktop Windows experience to the pocket, pushing its Palm-size PC concept (after Palm had quashed the original “Palm PC” branding) on a world still feeling jilted by the failures of the Apple Newton. 3Com subsidiary Palm and its heavyweight licensee Handspring have figured out something interesting about the still-nascent PDA market, though: people like simplicity. If an electronic organizer does what it says it’s going to do, keeps your information in sync with your PC, runs for forever and a day on a single set of batteries, and does it all with a minimum of fuss, people will buy. It’s an exciting, challenging, and rapidly-changing era in the mobile business.
阅读剩余内容 »
bb, blackberry
Apache&php&Ftp, Linux十二 29th,2009ptubuntu
NameVirtualHost *
<VirtualHost *>
ServerName www.ptubuntu.com
DocumentRoot /home/www/html/
</VirtualHost>
如果你的主机上没有设置有两个.那么这第一个是默认的主机.所以你要添加只能添加下面两个新的虚拟主机才是正确的.
<VirtualHost *>
ServerName lab.test.com
DocumentRoot /home/www/html/test
</VirtualHost>
<VirtualHost *>
ServerName beta.test.com
DocumentRoot /home/www/html/test
</VirtualHost>
apache, apache2