The Count Mac OS

broken image


Set the System Time in Mac OS X from the Command Line. See full list on techworm.net. You can show the word count, character count (with or without spaces), number of paragraphs, and number of pages in a document. Show word, character, or paragraph count Add the page count to a document See also Add and remove headers and footers in Pages on Mac.

Short summary: Mac OS X's default power management settings might wear your hard drive down unnecessarily. This post provides a lot of background information and how to change these settings.

I recently got a new MacBook Pro and one interesting thing i noticed was light 'click' (a clicking noise) from it whenever it was idle for a few seconds. I pay attention to such things since I heard about problems with power management settings under Ubuntu, which could quickly wear down a hard drive. I experienced this myself, where one of my old hard drives started to sound like a frog :-/. So I installed smartmontools (either use MacPorts, fink or Homebrew) and checked:

As you can see I have a Hitachi 500GB 7200rpm drive. The puzzling fact here is the Load_Cycle_Count. You can see a value of 36,492 load cycle counts in 351 hours the HD was powered on, so approx. 100 per hour.
Put easily the load cycle count is how often your HD decided to park its heads. Depending on the manufacturer and HD model this can mean several things. In my case it means the number of times the HD's heads are moved to a ramp next to the platters. The advantage of this is that being in this 'parked' position the drive can shut down some energy consuming parts and it is much harder to damage the drive when the heads are parked (nothing there for a Head crash).


The downside of parking the heads is that HDs are usually not designed to do this every few seconds. Typical limits range from 300,000 to 600,000 (link) load cycle counts. (This doesn't mean your HD will break if it does it more often, just that it's more likely to fail if worn down like that.)

To observe the development of your Load_Cycle_Count you can use the terminal with this small one-liner:

The script will log the load cycle count to your terminal and a file called hddLoadCounts.log in the current directory every minute.

You might notice that when doing nothing but browsing this count increases by 2-8 every minute. Playing music with iTunes seems to stop this, as the HD keeps busy reading your music. Doing the maths you'll find that it's not unlikely that your drive will have over 300,000 load cycle counts withing the first half year (lucky music listeners, yours will last much longer 🙂 ).

As I had a bad feeling about this, i went on to have a look into Hitachi's technical specs for my HD. Here you can find that my HD is designed for up to 600,000 load cycles (page 2), meaning approx. 6000 hours at the 100 cycles per hour rate. In the specs on page 135 you can find that if Advanced Power Management is enabled, the deepest reachable power saving is depending on the Power Management level. In general the Advanced Power Management Level is between 1 (power saving) and 254 (performance). If the Level is 0 or 255 no power saving is done, if the level is 1-127 it's 'Standby', if the level is 128-191 it's 'Low Power Idle' and if it's 192-254 it's 'Active Idle'.

As we'll find out in a second, the default value (which Mac OS X sometimes seems to reset) seems to be 128, so 'Low Power Idle' mode. The three power saving levels are explained in Section 12.6 'Advanced Power Management (Adaptive Battery Life Extender 3) Feature' of the specs. In short: 'Active Idle' mode cuts down power consumption by 45-55%, the heads are parked near the mid-diameter of the disk, recovering takes about 20ms. In 'Low Power Idle' mode power is cut down by 60-65%, the heads are unloaded to the ramp (this is the 'parked' counted by Load_Cycle_Count), recovering takes 300ms. Transition into these modes is magically done internally by the HD (it observes what's going on and decides what to do next), taking into account the Advanced Power Management Level. ('Standby' mode isn't mentioned here, but it sure unloads the heads to the ramp, as it spins down the HD… recovery will take long, but unimportant, as we're having a problem with 'Low Power Idle' mode.)

So how do we find out which Advanced Power Management (APM) Level our HDD uses?
This doesn't seem to be very easy in Mac OS X as there's nothing like the hdparm on Linux.
There is the hdapm tool, but it can't read the value, you can just set it. We'll learn why this tool is necessary in a moment, but first let's find out what the current value is.
The easiest way to accomplish this was to throw in a Linux Boot CD (Knoppix, Ubuntu, whatever you like), reboot, boot from CD (hold down the 'c'-key), then fire up some terminal, become root (sudo -i and check the current APM value:

For me it was 128.
You can check the immediate effect from within the Live CD: you can use smartctl -a /dev/sda. As before this kept increasing.

As I always handle my laptop with care and can live with 10 % more power consumption of my HD, I decided to change the default. WARNING: This might not be suitable for you, it's your decision.

To stop this rapid growth of the load cycles, I first tried to set the value to 191, but i could still observe a rapid increase.
After setting the value to 192, it immediately stopped:

Afterwards i rebooted, the Load_Cycle_Count increased by 1 over the reboot and no more after a couple of hours runtime (without iTunes keeping my HD busy, draining my battery). To my surprise the next day my logs showed that the load cycle count was increasing rapidly again, i rebooted back into linux and found the value was reset to 128. Weird. I reset it, rebooted, the count didn't increase anymore, but at some point i again found it increasing rapidly. Based on this I assume Mac OS X or something else (like Windows run via bootcamp) sometimes resets that value to 128. My first guess was that maybe it is reset after resuming from sleep, but I couldn't reproduce it by this. If someone finds out let us know in the comments.

To overcome this problem it seems sufficient to have a tool which explicitly resets the APM level once during system startup to something meaningful. That's where we remember the hdapm tool: You can download it from the given page and install it as described in the user guide.
Afterwards edit /Library/LaunchDaemons/hdapm.plist to set the correct APM value. As a reference my file looks like this:

Notice that for other drives, especially other manufacturers the 192 might not be the right value. If you found the correct values for other drives, be welcome to share them (preferably with links to tech specs) in the comments.

Now, after four months since discovering the problem went by, my load cycle count only increased by about 500 (which is about the number of times i sent the mac to standby). Isn't that a figure compared to the 36500 within the first month? 🙂

Edit (Sep. 22, 2011): Revised my guess about sleep causing the reset. Thx to Sam.

Related

Contents:

What Is Mac OS? Pros And Cons | Explanation

Files and Directories

See Full List On Techworm.net

Table A-1 describes the files anddirectories you may find in your root directory.The remaining tables in this chapter describe significantsubdirectories.

Table A-1. Mac OS X's root directory

File or directory

Description

.DS_Store

This file contains Finder settings, such as icon location and windowsize. The file will appear in any directory thatyou've viewed with the Finder.

.Trashes/

This directory contains files that have been dragged to the Trash. Ona boot volume, such files are stored in~/.Trash. On a non-boot volume, these files are in/.Trashes/uid/.

.hidden

This file contains a list of files that should be invisible to theFinder.

.vol/

This directory maps HFS+ file IDs to files. If you know afile's ID, you can open it using/.vol/id.

Applications (Mac OS 9)/

This directory contains all your OS 9 applications, ifyou've got Mac OS X and Mac OS 9 installed.

Applications/

This directory holds all your Mac OS X applications. ItsUtilities subdirectory includes lots of usefulthings, such as Terminal and Console.

Desktop DB

This file, along with Desktop DF, contains thedesktop database that is rebuilt when you click Rebuild Desktop inSystem Preferences Classic.

Desktop DF

See Desktop DB.

Desktop Folder/

This directory is the Mac OS 9 desktop folder.

Developer/

This directory contains Apple's Developer Tools anddocumentation. This is only available if you have installed theDeveloper Tools.

Documents/

This is the Mac OS 9 documents folder.

Tesla motors simulator mac os. Library/

This directory contains support files for locally installedapplications, among other things. See Table A-4, later in thischapter.

Network/

This directory contains network-mountedApplication, Library, andUsers directories, as well as aServers directory, which contains directoriesmounted by the automount daemon.

Shared Items/

In Mac OS 9, this folder gave multiuser systems a place where userscould store files that other users could access.

System Folder/

This is the Mac OS 9 System Folder.

System/

This directory contains a subdirectory, Library,which holds support files for the system and system applications,among other things. See Table A-3, later in this chapter.

Temporary Items/

This directory contains temporary files used by Mac OS 9.

TheVolumeSettingsFolder/

This directory keeps track of details such as open windows anddesktop printers.

Trash/

This directory is where Mac OS 9 stores deleted files until the Trashis emptied.

Users/

This directory contains home directories for the users on the system.The root user's home directoryis /var/root.

VM Storage

This is the Mac OS 9 virtual memory file.

Volumes/

This directory contains all mounted filesystems, including removablemedia and mounted disk images.

automount/

This directory handles static NFS mounts for theautomount daemon.

bin/

This directory contains essential system binaries.

cores/

This directory is a symbolic link (or symlink)to /private/cores. If core dumps are enabled(with tcsh'slimit andbash/sh'sulimit commands--see thetcsh and bash manpages formore details), they will be created in this directory ascore.pid.

dev/

This directory contains files that represent various devices. SeeTable A-6, later in this chapter.

etc/

This directory contains system configuration files. See Table A-2,later in this chapter. The directory is a symbolic link to/private/etc.

lost+found

This directory stores orphaned files discovered byfsck.

mach

This is a symbolic link to the /mach.sym file.

mach.sym

This file contains kernel symbols. It is generated during each bootby /etc/rc.

mach_kernel

This is the Darwin kernel. See Chapter 7 for more information about the kernel.

private/

This private directory contains the tmp,var, etc, andcores directories.

sbin/

This directory contains executables for system administration andconfiguration.

tmp/

This directory holds temporary files. It is a symbolic link to/private/tmp.

usr/

This directory contains BSD Unix applications and support files.

var/

This directory contains frequently modified files, such as log files.It is a symbolic link to /private/var.

A.1.1. The /etc Directory

Cached

The /etcdirectory contains configuration files for Unix applications andservices, as well as scripts that control system startup. Table A-2lists the contents of the /etc directory.

Table A-2. The /etc directory

File or directory

Description

6to4.conf

Configuration file for encapsulating IPv6 within IPv4. Seeip6config(8).

X11/

X11 configuration directory. This will be present only if you haveinstalled XDarwin.

acgid/

File that contains configuration files foracgid, a bridge between Apache and ACGI-capablescripting languages, such as AppleScript. Mac OS X Server only. Forequivalent functionality under Mac OS X, seehttp://www.sentman.com/acgi/.

afpovertcp.cfg

File that causes Mac OS X to use TCP/IP as the default transport forApple File Protocol (AFP). Use this file to configure the defaultsfor AFP over TCP/IP.

Tech art project 1 (gdudzic) mac os. appletalk.cfg

AppleTalk configuration file for routing or multihoming. See theappletalk.cfg(5) manpage.

authorization

File that controls how applications, such as installers, cantemporarily obtain root privileges.

bashrc

Global configuration file for bash, theBourne-again shell.

crontab

root'scrontab. See Section 2.3.1.

csh.cshrc

Global csh configuration file, processed whenthe shell starts up. If you have a .cshrc or.tcshrc file in your home directory,tcsh will execute its contents as well.

csh.login

Global csh login file, processed when a loginshell starts up. If you have a .login file inyour home directory, tcsh will execute itscontents as well.

csh.logout

Global csh logout file, processed when a userlogs out of a login shell.

cups/

Directory that contains configuration files for Common Unix PrintingSystem (CUPS).

daily

cron job that is run once a day (seecrontab). This is a symlink to/etc/periodic/daily/500.daily.

defaults/

Directory that contains default configuration files for applicationsand utilities.

diskspacemonitor/

Configuration files for diskspacemonitor, whichmonitors the amount of free disk space. Mac OS X Server only.

dumpdates

Dump date records created by dump(5), which isrun by /etc/daily.

find.codes

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

ftpusers

List of users who are prohibited from using FTP.

gdb.conf

Global gdb configuration file.

gettytab

Terminal configuration database.

group

Group permissions file. See Chapter 3 for moreinformation.

hostconfig

System configuration file that controls many of the startup itemsdescribed in Section 2.1.4 in Chapter 2.

hosts

Host database; a mapping of IP addresses to hostnames. You can usethis as a supplement to other Directory Services, such as DNS. Mac OSX 10.1 and earlier consulted this file only in single-user mode, butMac OS X 10.2 (Jaguar) uses this file at other times. For moreinformation, see Chapter 3.

hosts.equiv

List of trusted remote hosts and host-user pairs. This is used byrsh and is inherently insecure. You should usessh instead, which is a secure alternative. Seessh-keygen(1) to generate key pairs that can beused to set up a trust relationship with remote users.

hosts.lpd

List of hosts that are allowed to connect to the Unixlpd service.

httpd/

Directory that contains Apache's configuration files.

iftab

Configuration file for network interfaces.

inetd.conf

Internet super-server (inetd) configurationfile.

IPAliases

Configuration file for IP aliases.

kcpassword

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

kern_loader.conf

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

localtime

Symbolic link to your system's time zone, such as:/usr/share/zoneinfo/US/Eastern.

magic

Database of magic numbers used by the filecommand to determine a file's type.

mail/

Directory that contains configuration files forsendmail. Note that Open Directory handles themail aliases (see Chapter 3).

mail.rc

Global configuration file for /usr/bin/mail.

manpath.config

Configuration file for man.

master.passwd

Shadow passwd file. This is consulted only insingle-user mode. During normal system operation, Open Directorymanages user information (see Chapter 3).

moduli

System-wide prime numbers used for cryptographic applications such asssh.

monthly

Monthly cron job (seecrontab). This is a symlink to/etc/periodic/monthly/500.monthly.

motd

Message of the day. This is displayed each time you launch a newTerminal or log in remotely.

named.conf

Configuration file for named, the DNS daemon.For more details, see named(8).

networks

Network name database.

ntp.conf

Configuration file for the Network Time Protocol daemon, whichsynchronizes system time by accessing a remote server.

openldap/

Directory that contains configuration files for OpenLDAP, animplementation of the Lightweight Directory Access Protocol.

pam.d/

Directory that contains configuration files for PAM .

passwd

Password file. For more information, see Chapter 3.

periodic/

Directory that contains configuration files for theperiodic utility, which runscron jobs on a regular basis.

ppp/

Contains configuration files for Point-To-Point Tunneling Protocol(PPTP). Mac OS X Server only.

printcap

Printer configuration file for lpd. CUPSautomatically generates this file. For more information, seecupsd(8).

profile

Global profile for the Bourne-again shell.

protocols

Network protocol database.

racoon/

Directory that contains configuration files forraccoon, the IKE key management daemon.

rc

Startup script for multiuser mode.

rc.boot

Startup script for single-user mode.

rc.cleanup

Cleanup script invoked by /etc/rc.

rc.common

Common settings for startup scripts.

rc.netboot

Startup script for booting from the network using NetBoot. One chat 3 4 download free.

resolv.conf

DNS resolver configuration.

resolver/

Contains files used to resolve hostnames.

rmtab

Remote NFS mount table.

https://downrup192.weebly.com/the-only-one-girl-1stq-mac-os.html. rpc

RPC number-to-name mappings. Mac OS X 10.1 and earlier consulted thisfile only in single-user mode, but Mac OS X 10.2 (Jaguar) uses thisfile at other times. For more information, see Chapter 3.

rtadvd.conf

Configuration file for the router advertisement daemon. For moredetails, see rtadvd(8).

servermgrd/

Configuration files for the Server Manager daemon. Mac OS X Serveronly.

services

Internet service name database. Mac OS X 10.1 and earlier consultedthis file only in single-user mode, but Mac OS X 10.2 (Jaguar) usesthis file at other times. For more information, see Chapter 3.

shells

List of shells.

slpsa.conf

Configuration file for the service locator daemon(slpd).

smb.conf

Samba configuration file.

smb.conf.template

Template configuration file for Samba.

squirrelmail/

Configuration files for SquirrelMail, a web-based email client. Seehttp://www.squirrelmail.org. MacOS X Server only.

ssh_config

Global configuration file for OpenSSH client programs.

ssh_host_dsa_key

Private DSA host key for OpenSSH. This file, and the otherssh_host_* files, are created the first time youstart Remote Login in the Sharing System Preferences.

ssh_host_dsa_key.pub

Public DSA host key for OpenSSH.

ssh_host_key

Private host key for OpenSSH when using SSH 1 compatibility.

ssh_host_key.pub

Public host key for OpenSSH when using SSH 1 compatibility.

ssh_host_rsa_key

Private RSA host key for OpenSSH.

ssh_host_rsa_key.pub

Public RSA host key for OpenSSH.

sshd_config

Configuration file for the OpenSSH sshd daemon.

sudoers

Configuration file for the sudo command. Makesure you use the visudo command only to editthis file.

syslog.conf

syslogd configuration file.

ttys

Terminal initialization file.

ttys.installer

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

watchdog.conf

Configuration file for Mac OS X Server's watchdogservice. Watchdog restarts certain daemons if they die (similar toSystem V inittab).

webperfcache

File that contains configuration files for Mac OS XServer's webperfcache service,which sits between port 80 and your web server and caches staticpages.

weekly

Weekly cron job (seecrontab). This is a symlink to/etc/periodic/weekly/500.weekly.

xinetd.conf

Configuration file for xinetd, the extendedInternet superserver daemon.

xinetd.d/

File that contains service-specific configuration files forxinetd.

xtab

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

A.1.2. The /System/Library Directory

Table A-3 lists the directories storedunder the /System/Library directory. You shouldnot modify the contents of these directories or add new files tothem. Instead, use their counterparts in the/Library folder. For example, to install a newfont, drag it into /Library/Fonts, not/System/Library/Fonts.

Table A-3. The /System/Library directory

File or directory

Description

Axis/

Contains support files for Apache Axis. Mac OS X Server only.

Assistants/

Contains support files for the setup assistant. Mac OS X Server only.

Caches/

Contains caches used by various parts of the operating system.

CFMSupport/

Holds shared libraries used by Carbon applications.

Classic/

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

ColorPickers/

Includes localized resources for Mac OS X color pickers.

Colors/

Lists the names and values of colors used in the color picker control.

ColorSync/

Contains ColorSync profiles.

Components/

Contains application building blocks (components), such asAppleScript and color pickers. Components are not applicationsthemselves and are generally shared between applications.

CoreServices/

Contains system applications, such asSystemStarter, BootX, theFinder, and the login window.

Displays/

Contains ColorSync information for external monitors.

DTDs/

Contains document type definitions for XML documents used by thesystem, such as property lists.

Extensions/

Holds Darwin kernel extensions.

Extensions.kextcache

Contains information about extensions in the cache; a compressed XMLdocument.

Extensions.mkext

Contains the kernel extension cache. It is created at boot by/etc/rc.

Filesystems/

Contains drivers and utilities for various filesystems (MS-DOS,AppleShare, UFS, etc.).

Find/

Includes support files for Sherlock's contentindexing.

Fonts/

Contains core Mac OS X fonts.

Frameworks/

Holds a collection of reusable application frameworks, includingshared libraries, headers, and documentation.

Image Capture/

Contains device support files for the Image Capture application.

Java/

Contains Java class and jarfiles.

Keyboard Layouts/

Contains bundles that support internationalized keyboard layouts.

Keyboards/

Contains keyboard mappings.

Keychains/

Contains system-wide keychain files.(~/Library/Keychains contains per-userkeychains.)

LoginPlugins/

Contains helper applications that are launched as you log in.

Modem Scripts/

Contains modem configuration scripts.

MonitorPanels/

Includes panels used by System Preferences Displays.

OpenSSL/

Holds OpenSSL configuration and support files.

Perl/

Holds Perl Libraries.

PHP/

Contains PHP Libraries.

PreferencePanes/

Contains all the preference panes for the Preferences application.

Printers/

Contains printer support files.

PrivateFrameworks/

Holds private frameworks meant to support Mac OS X. These frameworksare not meant for programmers' use.

QuickTime/

Holds QuickTime support files.

QuickTimeJava/

Includes support files for the QuickTime/Java bridge.

Rulebooks/

Contains information used for text handling, such as word-breakingrules for hyphenation.

Screen Savers/

Contains screensavers that you can select from System Preferences Screen Saver.

ScriptingAdditions/

Includes AppleScript plug-ins and libraries.

Server Settings/

Contains plug-ins for the Server Settings utility. Mac OS X Serveronly.

ServerSetup/

Contains support files used when setting the initial serverconfiguration. Mac OS X Server only.

Services/

Contains services that are made available through the Services menu.

Sounds/

Contains sounds that are available in System Preferences Sound.

Speech/

Includes speech recognition and generation support files.

StartupItems/

Contains startup scripts as described in Chapter 2.

SystemConfiguration/

Contains plug-ins used to monitor various system activities (forApple use only).

SystemResources/

Contains precompiled header lists for the C compiler (see Section 5.1.1).

Tcl/

Holds Tcl libraries.

TextEncodings/

Contains localized text encodings.

User Template/

Lists localized skeleton files for user directories. See Section 3.8.3.

A.1.3. The /Library Directory

Mac - Apple

Table A-4 lists the contents of the/Library directory. This directory containscounterparts to many directories found in/System/Library. You can use the/Library counterparts for system-widecustomization. If you find a directory of the same name in your homeLibrary directory(~/Library), you can use that for user-levelcustomization. For example, you can install fonts for one particularuser by moving them into~/username/Library/Fonts.

Table A-4. The /Library directory

File or directory

Description

Application Support/

Contains support files for locally installed applications.

Audio/

Contains audio plug-ins and sounds.

Authenticators/

Contains authentication code for locally installed applications.

Caches/

Contains cached data used by various parts of the operating system.

CFMSupport/

Holds shared libraries used by Carbon applications.

ColorSync/

Contains user-installed ColorSync profiles and scripts.

Desktop Pictures/

Contains desktop pictures used by System Preferences Desktop.

Documentation/

Provides documentation for locally installed applications.

FTPServer/

Contains configuration files and the root folderof anonymous FTP server. Mac OS X Server only.

Filesystems/

Contains authentication support for the Apple Share network client.

Fonts/

Contains locally installed fonts.

Image Capture/

Contains locally installed scripts and plug-ins for the Image Captureapplication.

Internet Plug-Ins/

Contains locally installed browser plug-ins.

Java/

Contains locally installed Java classes (you can drop jar files into/Library/Java/Extensions), as well as a suitabledirectory to use as your $JAVA_HOME(/Library/Java/Home).

Keyboard Layouts/ Dance of the poverty gods mac os.

Contains keyboard mappings.

Logs/

Holds logs for services such as Apple File Services, the CrashReporter, and the Directory Service.

Macintosh Manager/

Contains support files for the Macintosh Manager application (Mac OSX Server only).

Modem Scripts/

Holds support files for various modem types.

Perl/

Lists locally installed Perl modules (MakeMaker'sINSTALLSITELIB).

PreferencePanes/

Contains system preference panes for locally installed utilities suchas TinkerTool.

Preferences/

Lists global preferences.

Printers/

Lists printer drivers and utilities.

QuickTime/

Contains locally installed QuickTime components.

QuickTimeStreaming/

Contains the QuickTime Streaming Server (Mac OS X Server only).

Receipts/

Leaves a receipt in the form of a .pkg directoryafter you install an application with the Mac OS X installer. The.pkg directory contains a bill of materials file(.bom), which you can read with thelsbom command.

Screen Savers/

Lists locally installed screensavers.

Scripts/

Contains a variety of AppleScripts installed with Mac OS X.

StartupItems/

Lists locally installed startup items. See Section 2.2.

Tomcat/

Holds the Apache Tomcat Java Servlet and JSP server (Mac OS X Serveronly).

User Pictures/

Contains user pictures that are used in the login panel.

WebServer/

Contains the Apache CGI and document rootdirectories.

A.1.4. The /var Directory

The /var directory contains transient andvolatile files, such as PID files (which tell you the process ID of acurrently running daemon), log files, and many others. Table A-5lists the contents of the /var directory.

Table A-5. The /var directory

File or directory

Description

at/

Contains information about jobs scheduled with theat command.

backups/

Contains backups of the NetInfo database.

cron/

Contains user crontab files.

db/

Includes a grab bag of configuration and data files, including thelocate database, the NetInfo database, andnetwork interface information.

empty/

Description not available at time of writing; see errata page athttp://www.oreilly.com/catalog/mosxgeeks.

log/

Contains a variety of log files, includingsyslog, mail, and web server logs.

mail/

Contains inboxes for local users' email.

msgs/

Holds system-wide messages that were delivered using msgs-s.

named/

Includes various files used for local DNS services.

netboot/

Contains various files used for NetBoot.

root/

Serves as the root user's homedirectory.

run/

Holds PID files for running processes. Also contains working filesused by programs such as sudo.

rwho/

Contains information used by the rwho command.

servermgrd/

Contains runtime files used by the Server Manager daemon. Mac OS XServer only.

spool/

Serves as a spool directory for mail, printer queues, and otherqueued resources.

tmp/

Serves as a temporary file directory.

vm/

Contains your swap files.

yp/

Contains files used by NIS.

A.1.5. The /dev Directory

The /dev directory containsfiles that represent devices attached to the system, includingphysical devices, such as serial ports, and pseudodevices, such as arandom number generator. TableA-6 lists the contents of the /dev directory.

The Count Mac Os Catalina

Table A-6. The /dev directory

File or directory

Description

bpf[0-3]

Berkeley Packet Filter devices. See bpf(4).

console

The system console. This is owned by whoever is currently logged in.If you write to it, the output will end up in/var/tmp/console.log, which you can view withthe Console application(/Applications/Utilities).

cu.modem

Modem device for compatibility with the Unix cu(call up) utility.

disk[0-n]

Disk.

disk[0-n]s[0-n]

Disk partition. For example, /dev/disk0s1 is thefirst partition of /dev/disk0.

fd/

Devices that correspond to file descriptors. See thefd manpage for more details.

klog

Device used by syslogd to read kernel messages.

kmem

Image of kernel memory.

mem

Image of the system memory.

null

Bit bucket. You can redirect anything here, and it will disappear.

ptyp[0-f]

Master ends of the first sixteen pseudo-ttys.

pty[q-w][0-f]

Master ends of the remaining pseudo-ttys.

random

Source of pseudorandom data. See random(4).

rdisk[0-n]

Raw disk device.

rdisk[0-n]s[0-n]

Raw disk partition.

stderr

Symbolic link to /dev/fd/2.

stdin

Symbolic link to /dev/fd/0.

stdout

Symbolic link to /dev/fd/1.

tty

Standard output stream of the current Terminal or remote login.

tty.modem

Modem device.

ttyp[0-f]

Slave ends of the first sixteen pseudo-ttys.

tty[q-w][0-f]

Slave ends of the remaining pseudo-ttys.

urandom

Source of pseudorandom data, not guaranteed to be strong. Seerandom(4).

vn[0-3]

Pseudo disk devices.

zero

Infinite supply of null characters. Often used withdd to create a file made up of nullcharacters.

This Should Be Cross Platform. At Least For Linux And Mac OS X. Python -c 'import Multiprocessing As Mp; Print(mp.cpu_count())' A Little Bit Slow.

IV. AppendixesB. Command-Line Tools: The Missing Manpages

Copyright © 2003 O'Reilly & Associates. All rights reserved.





broken image