rm -rf /tmp之后无法在此目录下创建文件

初学求教,

[root@StudyLinux tmp]# ls
1.txt  3.txt  5.txt   ks-script-JKp08e            vmware-root_796-2991202916  vmware-root_978-2957649101
2.txt  4.txt  as.txt  vmware-root_785-4282170929  vmware-root_845-4021653450  yum.log
[root@StudyLinux tmp]# rm -rf /tmp/
[root@StudyLinux tmp]# ls
[root@StudyLinux tmp]# touch {a..d}.txt
touch: cannot touch ‘a.txt’: No such file or directory
touch: cannot touch ‘b.txt’: No such file or directory
touch: cannot touch ‘c.txt’: No such file or directory
touch: cannot touch ‘d.txt’: No such file or directory
[root@StudyLinux tmp]# 

因为你把当前目录和上级目录都删除了,你可以回到根目录看看,这个时候的tmp目录已经没有了
每个目录下都有一个隐藏的.和..两个目录,表示当前目录和上级目录,你的rm -rf /tmp/ 是把这个目录下的所有文件全部删除也包括了那两个隐藏的目录