|
OSXFAQ Mac OS X UNIX Tip-of-the-Day

Week 103 - Unix Commands Reference III (4 April 2005)
by
Adrian Mayo - Editor, OSXFAQ
Monday - Commands for Info on Machine and Discs
The last two weeks and the next two weeks will form a Unix command reference by listing lots of commands under specific areas of usage. There are so many commands available that it is impossible to know them all, or even remember all those one knew and used just last month.
See the rest of the tips for lots of example usage of these commands.
See the Learning Centre for tutorials on these commands, and explanations of Unix permissions.
And of course, don't forget the Unix manual 'man'.
For information on the machine (host), including hardware, operating system, and kernel use:
arch ... display the machine architecture
machine ... display the processor type
uname ... display o/s name, version, and processor type
Option -a to print full (all) information
hostinfo ... display information on the host kernel
The above commands are often used by the 'make' and './configure' system to help build the correct binaries for the host platform.
hostname ... set and display the host's network name
Option -s to display hostname without domain name
uptime ... display for how long system has been running
date ... display and set the system date
AppleSystemProfiler ... display comprehensive details
This command is no longer included in Panther. It is incorporated into the System Profiler command in
Application:Utilities (or from the About This Mac box).
(See tips week 11)
ioreg ... show the i/o registration for all hardware
For information on disc usage use:
du ... display disc usage statistics
Option -a to report for all files in the hierarchy
Option -c to display a grand total
Option -h to display file sizes in K-, M-, and G-bytes
Option -s * to display information for each file
df ... display disc free information for all discs
Option -h to display file sizes in K-, M-, and G-bytes
Option -i to display inode statistics too
(See tips week 5)
fsck ... verify and repair filesystems
Option -f to force check, useful for journaled devices
Option -y to complete check without manual intervention
(See tips weeks 55, 100)
mount ... display information on mounted devices
As well as mounting devices, the mount command on its own shows information on each mounted device, including whether it is local and whether it is journaled.
(See tips week 56, 84)
disktool -l ... list discs
Disktool is part of Apple's command line interface to the file system.
(See tips week 22)
If you want to learn more about Mac OS X Unix visit the Learning Center
click.
- For beginners: Mac OS X Unix Tutorials
- For detailed information on specific topics: Advanced Unix
- For OS X in gereral: Mac OS X Tutorials
|