Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 710 — #736
i
i
i
i
i
i
i
i
28.3 File Properties: stat
The command stat displays details of the properties of a file:
$ stat xml-doc.txt
File: ‘xml-doc.txt’
Size: 632 Blocks: 8 IO Block: 4096 regular file
Device: eh/14d Inode: 5938009 Links: 1
Access: (0644/-rw-r--r--) Uid: (11994/ jj) Gid: ( 50/ suse)
Access: 2004-04-27 20:08:58.000000000 +0200
Modify: 2003-06-03 15:29:34.000000000 +0200
Change: 2003-07-23 17:48:27.000000000 +0200
The parameter --filesystem produces details of the properties of the file
system in which the specified file is located:
$ /usr/bin/stat . --filesystem
File: "."
ID: 0 Namelen: 255 Type: ext2/ext3
Blocks: Total: 19347388 Free: 17831731 Available: 16848938 Size: 4096
Inodes: Total: 9830400 Free: 9663967
28.4 Processes: top
The command top (which stands for "table of processes") displays a list of
processes that is refreshed every two seconds. To terminate the program,
press
Q . The parameter -n 1 terminates the program after a single dis-
play of the process list:
$ top -n 1
top - 14:19:53 up 62 days, 3:35, 14 users, load average: 0.01, 0.02, 0.00
Tasks: 102 total, 7 running, 93 sleeping, 0 stopped, 2 zombie
Cpu(s): 0.3% user, 0.1% system, 0.0% nice, 99.6% idle
Mem: 514736k total, 497232k used, 17504k free, 56024k buffers
Swap: 1794736k total, 104544k used, 1690192k free, 235872k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ Command
1426 root 15 0 116m 41m 18m S 1.0 8.2 82:30.34 X
20836 jj 15 0 820 820 612 R 1.0 0.2 0:00.03 top
1 root 15 0 100 96 72 S 0.0 0.0 0:08.43 init
2 root 15 0 0 0 0 S 0.0 0.0 0:04.96 keventd
3 root 34 19 0 0 0 S 0.0 0.0 0:00.99 ksoftirqd_CPU0
4 root 15 0 0 0 0 S 0.0 0.0 0:33.63 kswapd
5 root 15 0 0 0 0 S 0.0 0.0 0:00.71 bdflush
[...]
1362 root 15 0 488 452 404 S 0.0 0.1 0:00.02 nscd
1363 root 15 0 488 452 404 S 0.0 0.1 0:00.04 nscd
1377 root 17 0 56 4 4 S 0.0 0.0 0:00.00 mingetty
1379 root 18 0 56 4 4 S 0.0 0.0 0:00.01 mingetty
1380 root 18 0 56 4 4 S 0.0 0.0 0:00.01 mingetty
710
28.3. File Properties: stat










