1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| $ file a aaa.html b.sh a: ASCII text aaa.html: HTML document, ASCII text b.sh: Bourne-Again shell script, ASCII text executable
$ file -b a aaa.html b.sh ASCII text HTML document, ASCII text Bourne-Again shell script, ASCII text executable $ more filelist a aaa aaa.html a.tar b.sh
$ file -f filelist a: ASCII text aaa: ASCII text aaa.html: HTML document, ASCII text a.tar: POSIX tar archive (GNU) b.sh: Bourne-Again shell script, ASCII text executable
$ file -F"=" a aaa.html b.sh a= ASCII text aaa.html= HTML document, ASCII text b.sh= Bourne-Again shell script, ASCII text executable
$ file -i a a: text/plain; charset=us-ascii $ file -i aaa.html aaa.html: text/html; charset=us-ascii $ ll a b -rw-r--r-- 1 root root 140 Feb 7 23:50 a lrwxrwxrwx 1 root root 1 Feb 8 13:04 b -> a
$ file a b a: ASCII text b: symbolic link to 'a'
$ file -L a b a: ASCII text b: ASCII text
$ file -h a b a: ASCII text b: symbolic link to 'a'
$ file a aaa.html a: ASCII text aaa.html: HTML document, ASCII text
$ file -N a aaa.html a: ASCII text aaa.html: HTML document, ASCII text $ file /dev/sda1 /dev/sda1: block special
$ file -s /dev/sda1 /dev/sda1: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs) $ file -s a a: ASCII text $ file -s /dev/sda2 /dev/sda2: LVM2 PV (Linux Logical Volume Manager), UUID: pMp2wr-fcQt-RD12-ePVv-BDUn-SLFx-SLfW33, size: 20400046080
|