February 23rd, 2007
Part 3: Helpful Command-Line Commands (Mac OS X)
By Kyle Reasons
Contributing Writer, RealTechNews
Mac OS X
General
- cat
- Displays the contents of a file to the screen
- Changes to another directory
- Changes the group associated with one or more files to a different group
- Controls file security
- Changes file ownership
- Sets your login shell
- cmp
- Used to compare two files
- Copies a file to another directory
- Shows a report of how the disk space is used
- Backs up files
- Used to edit disk quotas associated with user accounts
- Formats and partitions a disk
- Displays the file type
- find
- Used to find specific files
- Performs a verification of the file system
- Looks for a string of characters in a file
- Stops a process
- Shows the contents of a file with the ability to go back or move ahead in the file
- Creates symbolic file links
- Used to check a print queue
- Prints a file
- Removes print jobs from the queue
- Lists the contents of a directory
- Displays documentation
- Creates a directory
- Displays text in a file one screen at a time
- Lists the disks currently mounted; also mounts file systems and devices
- Moves a file to a different directory
- Creates a new file system
- Used to change a password
- Used to format a file into pages or columns for printing
- Prints environment variables that are already set up
- Shows currently running processes
- Displays the directory you are in
- Displays the disk quota for users
- Verifies the disk quota files, including reporting disk usage
- Enables or disables disk quotas
- Performs a remote copy
- Makes a report of disk quotas
- Restores files (from a dump)
- Removes a file or directory
- Deletes a directory that is empty
- Secure version of ftp or rcp
- Sorts the contents of a text file
- A secure version of ftp
- Forces information in memory to be written to disk
- Used to archive files
- Used to remotely connect to another computer
- Shows a report of the main, current processes engaging the CPU
- Creates an empty file
- Dismounts a file system
- Shows information about the machine and operating system
- Displays a report about virtual memory use
- Locates a specific file
Network Commands
- finger
- Provides information about a user
- Enables file transfers
- Used to set up a network interface
- Shows network connection information
- Shows statistics for NFS file upload and download activity
- Used to query information on Internet DNS servers
- Used to poll another TCP/IP node to verify you can communicate with it
- Displays routing table information and can be used to configure routing
- Shows clients that have mounted volumes on a NFS server
- Shows who is logged on












Mantawolf says:
Doesnt an operating system need to be used by real people before the commands can be considered useful?
:p
wait for it…
February 23rd, 2007 at 11:26 am
ed3 says:
See my comments back on Part 2…
Most of these commands are some 20/30 years old and are not limited to Mac OSX.
Heck, install Cygwin or GNU Coreutils and you too can have a very powerful UNIX-like shell on your Windows system. Write a script once in ksh and it’ll run practically anywhere.
Write a bat script in Windows/DOS commands and it’ll run on… Windows/DOS systems.
February 25th, 2007 at 7:18 am
Kyle Reasons says:
Thanks for the tip ed3.
February 25th, 2007 at 8:51 am
Druid says:
Ed3, I am a Cygwin user at work and would also recommend it to Windows users who need a touch of Unix. BUT, having said that, my real recommendation to anyone wanting Unix is: get a Mac. As I rummage around the config files in OS X I see a lot of references to FreeBSD due to OS X’s roots. The Mach kernel is not “Unix-like” is IS Unix. My recent switch to being a Mac user wasn’t me running ‘from’ Windows, it was me running ‘to’ OS X (and ‘from’ Linux).
February 27th, 2007 at 1:12 pm