- 论坛徽章:
- 13
|
本帖最后由 ulovko 于 2012-07-24 20:45 编辑
- True if the file is of the specified type. Possible file types
- are as follows:
- b block special
- c character special
- d directory
- f regular file
- l symbolic link
- p FIFO
- s socket
复制代码 About file: http://linux.vbird.org/linux_basic/0220filemanager.php#file
About find: http://linux.vbird.org/linux_basic/0220filemanager.php#find
请耐心观看鸟哥私房菜学习基础知识: http://bbs.chinaunix.net/thread-3757881-1-2.html- > man file
- EXAMPLES
- $ file file.c file /dev/{wd0a,hda}
- file.c: C program text
- file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
- dynamically linked (uses shared libs), stripped
- /dev/wd0a: block special (0/0)
- /dev/hda: block special (3/0)
- $ file -s /dev/wd0{b,d}
- /dev/wd0b: data
- /dev/wd0d: x86 boot sector
- $ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}
- /dev/hda: x86 boot sector
- /dev/hda1: Linux/i386 ext2 filesystem
- /dev/hda2: x86 boot sector
- /dev/hda3: x86 boot sector, extended partition table
- /dev/hda4: Linux/i386 ext2 filesystem
- /dev/hda5: Linux/i386 swap file
- /dev/hda6: Linux/i386 swap file
- /dev/hda7: Linux/i386 swap file
- /dev/hda8: Linux/i386 swap file
- /dev/hda9: empty
- /dev/hda10: empty
- $ file -i file.c file /dev/{wd0a,hda}
- file.c: text/x-c
- file: application/x-executable
- /dev/hda: application/x-not-regular-file
- /dev/wd0a: application/x-not-regular-file
复制代码 |
|