du命令 and touch命令簡單實用

tolilong發表於2012-10-21
linux中du命令:主要是檢視大小
[root@oracle10g u01]# ll
total 28
drwxrwxr-x 2 oracle oinstall  4096 Oct 19 10:14 arch
drwxrwxr-x 2 oracle oinstall 16384 Sep 21 04:17 lost+found
drwxrwxr-x 5 oracle oinstall  4096 Sep 21 22:06 oracle
drwxrwxr-x 3 oracle oinstall  4096 Sep 21 22:06 oradata
[root@oracle10g u01]# du -sh
2.9G    .
[root@oracle10g u01]# du -sh /u01/
2.9G    /u01/

linux 中touch:新建空檔案,或更新檔案時間標識

建立空檔案:
[root@oracle10g shell]# touch 1.sh
[root@oracle10g shell]# touch 2.sh 3.sh
[root@oracle10g shell]# ll
total 0
-rw-r--r-- 1 root root 0 Oct 22 07:54 1.sh
-rw-r--r-- 1 root root 0 Oct 22 07:54 2.sh
-rw-r--r-- 1 root root 0 Oct 22 07:54 3.sh

變更時間:
[root@oracle10g shell]# touch 1.sh 
[root@oracle10g shell]# ll
total 0
-rw-r--r-- 1 root root 0 Oct 22 07:55 1.sh
-rw-r--r-- 1 root root 0 Oct 22 07:54 2.sh
-rw-r--r-- 1 root root 0 Oct 22 07:54 3.sh

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-746877/,如需轉載,請註明出處,否則將追究法律責任。