- [root@www ~]# ls /
- bin dev home lost+found misc mydata opt root selinux sys usr
- boot etc lib media mnt net proc sbin srv tmp var
- [root@www ~]# pwd
- /root
- [root@www ~]# cd /etc/sysconfig
- [root@www sysconfig]# pwd
- /etc/sysconfig
- [root@www sysconfig]# cd ..
- [root@www etc]# cd -
- /etc/sysconfig
- [root@www sysconfig]# cd ../..
- [root@www /]# pwd
- /
- [root@www /]# cd
- [root@www ~]# pwd
- /root
- [root@www ~]# cd ~
- [root@www ~]# pwd
- /root
- [root@www ~]#
- [root@www ~]# ls -al /
- total 162
- drwxr-xr-x 24 root root 4096 Sep 27 15:57 .
- drwxr-xr-x 24 root root 4096 Sep 27 15:57 ..
- -rw-r--r-- 1 root root 0 Sep 27 12:47 .autofsck
- drwxr-xr-x 2 root root 4096 Sep 27 14:01 bin
- drwxr-xr-x 4 root root 1024 Aug 25 23:55 boot
- drwxr-xr-x 13 root root 4100 Sep 27 19:48 dev
- drwxr-xr-x 92 root root 12288 Sep 27 19:55 etc
- drwxr-xr-x 7 root root 4096 Sep 27 17:39 home
- drwxr-xr-x 13 root root 4096 Sep 27 14:35 lib
- drwx------ 2 root root 16384 Aug 26 07:32 lost+found
- drwxr-xr-x 2 root root 4096 Aug 8 2008 media
- drwxr-xr-x 2 root root 0 Sep 27 12:48 misc
- drwxr-xr-x 2 root root 4096 Aug 8 2008 mnt
- drwxr-xr-x 4 root root 4096 Sep 27 16:00 mydata
- drwxr-xr-x 2 root root 0 Sep 27 12:48 net
- drwxr-xr-x 2 root root 4096 Aug 8 2008 opt
- dr-xr-xr-x 238 root root 0 Sep 27 12:46 proc
- drwxr-x--- 18 root root 4096 Oct 13 11:38 root
- drwxr-xr-x 2 root root 12288 Sep 27 14:01 sbin
- drwxr-xr-x 4 root root 0 Sep 27 12:46 selinux
- drwxr-xr-x 2 root root 4096 Aug 8 2008 srv
- drwxr-xr-x 11 root root 0 Sep 27 12:46 sys
- drwxrwxrwt 8 root root 4096 Oct 13 10:31 tmp
- drwxr-xr-x 18 root root 4096 Sep 27 17:53 usr
- drwxr-xr-x 22 root root 4096 Sep 27 14:51 var
- [root@www ~]# mkdir /knight/test
- mkdir: cannot create directory `/knight/test': No such file or directory
- [root@www ~]# mkdir -pv /knight/test
- mkdir: created directory `/knight'
- mkdir: created directory `/knight/test'
- [root@www ~]# mkdir a b c d
- [root@www ~]# ls
- a c install.log nginx
- anaconda-ks.cfg d install.log.syslog test.txt
- b Desktop
- [root@www ~]# rmdir /knight/test/
- [root@www ~]# mv a b c d
- [root@www ~]# ls
- anaconda-ks.cfg install.log nginx
- d install.log.syslog test.txt
- Desktop
- [root@www ~]# cd d
- [root@www d]# ls
- a b c
- [root@www ~]# mv d test
- [root@www ~]# ls
- anaconda-ks.cfg install.log.syslog test
- Desktop mbox test.txt
- install.log nginx
- [root@www ~]# touch knight
- [root@www ~]# stat knight
- File: `knight'
- Size: 0 Blocks: 8 IO Block: 4096 regular empty file
- Device: fd00h/64768d Inode: 66926 Links: 1
- Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
- Access: 2011-10-13 11:51:35.000000000 +0800
- Modify: 2011-10-13 11:51:35.000000000 +0800
- Change: 2011-10-13 11:51:35.000000000 +0800
- [root@www ~]# touch -m -t 1110011001.00 knight
- [root@www ~]# stat knight
- File: `knight'
- Size: 0 Blocks: 8 IO Block: 4096 regular empty file
- Device: fd00h/64768d Inode: 66926 Links: 1
- Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
- Access: 2011-10-13 11:51:35.000000000 +0800
- Modify: 2011-10-01 10:01:00.000000000 +0800
- Change: 2011-10-13 11:53:02.000000000 +0800
- [root@www ~]# ls
- anaconda-ks.cfg install.log.syslog nginx wordpress-3.0.4-zh_CN.zip
- Desktop knight test
- install.log mbox test.txt
- [root@www ~]# rm -rf test
- [root@www ~]# ls
- anaconda-ks.cfg install.log.syslog nginx
- Desktop knight test.txt
- install.log mbox wordpress-3.0.4-zh_CN.zip
- [root@www ~]# cp /etc/inittab ./
- [root@www ~]# ls
- anaconda-ks.cfg install.log mbox wordpress-3.0.4-zh_CN.zip
- Desktop install.log.syslog nginx
- inittab knight test.txt
本文出自 “nulix” 博客,谢绝转载!