免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12521 | 回复: 6
打印 上一主题 下一主题

如何清空/tmp目录? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-21 19:32 |只看该作者 |倒序浏览
系统centos4.4,安装系统时候我是采用默认的分区的。

用SSH连上也打不开/tmp目录 一打开就卡住。。

重启后还是打不开。。

cd /tmp
ls -l

也是卡住。

另外
[root@HLSERVER tmp]# more /etc/vfstab
/etc/vfstab: No such file or directory


centos 是不是没有vfstab的文件呀?

清空/tmp 我试过的办法:


1
[root@HLSERVER usr]# cd /tmp
[root@HLSERVER tmp]# rm -rf *

就卡住了。。过N长时间没反应。

2
[root@HLSERVER /]# rm -rf /tmp/*


还是卡住了。。过N长时间没反应。


setup里面的服务一共有:
gpm
mysqld
network
sshd
vsftpd
syslogd


进程

[root@HLSERVER tmp]# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:00 init [3]                                   
    2 ?        S      0:00 [migration/0]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S      0:00 [migration/1]
    5 ?        SN     0:00 [ksoftirqd/1]
    6 ?        S<     0:00 [events/0]
    7 ?        S<     0:00 [events/1]
    8 ?        S<     0:00 [khelper]
    9 ?        S<     0:00 [kacpid]
   29 ?        S<     0:00 [kblockd/0]
   30 ?        S<     0:00 [kblockd/1]
   48 ?        S      0:00 [pdflush]
   49 ?        S      0:00 [pdflush]
   51 ?        S<     0:00 [aio/0]
   52 ?        S<     0:00 [aio/1]
   31 ?        S      0:00 [khubd]
   50 ?        S      0:00 [kswapd0]
  198 ?        S      0:00 [kseriod]
  312 ?        S<     0:00 [ata/0]
  313 ?        S<     0:00 [ata/1]
  317 ?        S      0:00 [scsi_eh_0]
  318 ?        S      0:00 [scsi_eh_1]
  335 ?        S<     0:00 [kmirrord]
  347 ?        S      0:00 [kjournald]
1423 ?        S<s    0:00 udevd
1904 ?        S<     0:00 [kauditd]
1964 ?        S      0:00 [kjournald]
2633 ?        Ss     0:00 syslogd -m 0
2637 ?        Ss     0:00 klogd -x
2679 ?        Ss     0:00 /usr/sbin/sshd
2697 ?        Ss     0:00 gpm -m /dev/input/mice -t imps2
2708 ?        S      0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/HLSERVER.
2715 ?        S      0:00 /bin/sh ./alsy.sh
2736 ?        S      0:00 /bin/sh ./hlds_run -pingboost 3 -tos +sys_ticrate 3000 +maxplayers 31 +map de_dust2 +servercfgfile 27015.cfg -game
2741 ?        S      0:09 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
2753 ?        S<     4:55 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 3000 +maxplayers 31 +map de_dust2 +servercfgfile 27015.cfg -game cstrike
2764 ?        Ss     0:00 /usr/local/apache2/bin/httpd -k start
2768 ?        S      0:00 /bin/sh ./kz.sh
2770 ?        S      0:00 /bin/sh ./match.sh
2775 ?        S<     1:12 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 500 -game cstrike -insecure -norestart +port 27016 +mapcyclefile kzmap.t
2776 ?        S      0:00 /bin/sh ./hlds_run -pingboost 3 -tos +sys_ticrate 2000 +maxplayers 14 +map de_dust2 +servercfgfile match.cfg -game
2786 tty1     Ss+    0:00 /sbin/mingetty tty1
2791 tty2     Ss+    0:00 /sbin/mingetty tty2
2793 tty3     Ss+    0:00 /sbin/mingetty tty3
2794 tty4     Ss+    0:00 /sbin/mingetty tty4
2796 tty5     Ss+    0:00 /sbin/mingetty tty5
2798 tty6     Ss+    0:00 /sbin/mingetty tty6
3358 ?        S<     0:09 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 2000 +maxplayers 14 +map de_dust2 +servercfgfile match.cfg -game cstrike
3361 ?        S      0:03 /usr/local/apache2/bin/httpd -k start
3365 ?        S      0:01 /usr/local/apache2/bin/httpd -k start
3368 ?        S      0:04 /usr/local/apache2/bin/httpd -k start
3373 ?        S      0:04 /usr/local/apache2/bin/httpd -k start
3391 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3392 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3393 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3394 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3395 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3396 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3397 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3398 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3399 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
3428 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 500 -game cstrike -insecure -norestart +port 27016 +mapcyclefile kzmap.t
3429 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 500 -game cstrike -insecure -norestart +port 27016 +mapcyclefile kzmap.t
3447 ?        Rs     0:00 sshd: root@pts/0
3472 ?        Ds     0:11 /usr/libexec/openssh/sftp-server
3553 pts/0    Ss     0:00 -bash
3597 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 3000 +maxplayers 31 +map de_dust2 +servercfgfile 27015.cfg -game cstrike
3598 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 3000 +maxplayers 31 +map de_dust2 +servercfgfile 27015.cfg -game cstrike
3609 ?        S      0:05 /usr/local/apache2/bin/httpd -k start
3614 ?        S      0:02 /usr/local/apache2/bin/httpd -k start
3615 ?        S      0:05 /usr/local/apache2/bin/httpd -k start
3626 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 500 -game cstrike -insecure -norestart +port 27016 +mapcyclefile kzmap.t
3642 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 2000 +maxplayers 14 +map de_dust2 +servercfgfile match.cfg -game cstrike
3643 ?        S<     0:00 ./hlds_i686 -pingboost 3 -tos +sys_ticrate 2000 +maxplayers 14 +map de_dust2 +servercfgfile match.cfg -game cstrike
3915 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
5554 ?        S      0:01 /usr/local/apache2/bin/httpd -k start
5569 ?        S      0:00 /usr/local/apache2/bin/httpd -k start
5571 ?        S      0:01 /usr/local/apache2/bin/httpd -k start
5647 ?        S      0:00 /usr/local/apache2/bin/httpd -k start
5658 ?        S      0:02 /usr/local/apache2/bin/httpd -k start
5990 ?        S      0:01 /usr/local/apache2/bin/httpd -k start
5994 ?        S      0:01 /usr/local/apache2/bin/httpd -k start
6114 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
6115 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
6199 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
6210 ?        S      0:00 /usr/local/apache2/bin/httpd -k start
6211 ?        S      0:00 /usr/local/apache2/bin/httpd -k start
6218 ?        S      0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=
6278 pts/0    R+     0:00 ps ax
[root@HLSERVER tmp]#



请问如何清空/tmp目录?

[ 本帖最后由 260009610 于 2007-11-21 19:41 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-11-21 23:31 |只看该作者
CentOS 有 fstab ,但是没有 vfstab 。

论坛徽章:
0
3 [报告]
发表于 2007-11-22 01:39 |只看该作者
[root@HLSERVER ~]# more /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
#/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hda                /media/cdrom            auto    pamconsole,exec,noauto,m


哎  还是没办法清空/tmp

我可怎么办啊

论坛徽章:
0
4 [报告]
发表于 2007-11-22 08:33 |只看该作者
lsof 或者 fuser 看一下有那些进程和 /tmp 有关

论坛徽章:
0
5 [报告]
发表于 2007-11-22 14:46 |只看该作者
我的系统上直接 rm -rf *就可以了,没有出现过LZ说的那样的问题。

论坛徽章:
0
6 [报告]
发表于 2007-11-22 14:57 |只看该作者
如果你的 /tmp 分区是单独分出来使用的   
请将其直接格式化!   

或者启动到救护模式 再做清理
#rm -rf /tmp/*

论坛徽章:
0
7 [报告]
发表于 2007-11-25 21:42 |只看该作者
如何或者启动到救护模式?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP