Search This Blog

Thursday 29 April 2010

Outlook: Adding Mail box files

http://www.uwgb.edu/compserv/ehelp/outlook/additional_mailboxes.htm



Follow these steps to add an additional mailbox in Outlook 2007.

1. From Mail Folders in the Navigation Pane, right-click on Mailbox - YourName. Scroll to the bottom of the menu and select Properties for Mailbox - Yourname


2. From the General tab, Select Advanced.
3. At the Microsoft Exchange Server window, select the Advanced tab, and then click on Add...

3. The Add Mailbox Dialog box appears. In the Add mailbox text box, type the username of the person or name of the mailbox you are adding.
add mailbox.
Click OK to close the Add Mailbox windows. Click OK, and then OK again to close the Outlook Today window.
4. The new mailbox should appear at the bottom of your Mail Folders list, identified by name.
NOTE: If you are not seeing any folders, click the plus (+) sign next to the mailbox.
additional mailbox added

Sunday 25 April 2010

Excel: Hide error values

Format text in cells that contain errors so that they don't show
  1. Select the range of cells that contain the error value.
  2. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting, and then click Manage Rules.The Conditional Formatting Rules Manager dialog box is displayed.
  3. Click New rule.The New Formatting Rule dialog box is displayed.
  4. Under Select a Rule Type, click Use a formula to determine which cells to format.
  5. Under Edit the Rule Description, in the Format values where this formula is true list box, enter the following formula: =ISERROR(reference)
    Where reference is a relative reference to the cell that contains the error value.
  6. Click Format, and then click the Font tab.
  7. In the Color box, select white.

Display a dash, #N/A, or NA in place of an error value

To do this task, use the IFERROR and NA functions.

Example

The example may be easier to understand if you copy it to a blank worksheet.
  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic.  Note   Do not select the row or column headers.
    Selecting an example from Help
    Selecting an example from Help
  3. Press CTRL+C.
  4. In the worksheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
 
1
2
3
A
Data
10
0
Formula Description (Result)
=A2/A3 Results in an error (#DIV/0)
=IFERROR(A2/A3,"NA") Returns NA when the value is an error
=IFERROR(A2/A3,"-") Returns a dash when the value is an error
=IFERROR(A2/A3,NA()) Returns #N/A when the value is an error

Hide error values in a PivotTable report

  1. Click the PivotTable report.
  2. On the Options tab, in the PivotTable Options group, click the arrow next to Options, and then click Options.
  3. Click the Layout & Format tab, and then do one or more of the following: Change error display   Select the For error values, show check box under Format. In the box, type the value that you want to display instead of errors. To display errors as blank cells, delete any characters in the box.
    Change empty cell display   Select the For empty cells, show check box. In the box, type the value that you want to display in empty cells. To display blank cells, delete any characters in the box. To display zeros, clear the check box.

Hide error indicators in cells

If a cell contains a formula that breaks one of the rules, a triangle appears in the top-left corner of the cell. You can prevent these indicators from being displayed.

Cell with a formula problem
Cell with a formula problem

  1. Click the Microsoft Office Button Button image, click Excel Options, and then click the Formulas category.
  2. Under Error Checking, clear the Enable background error checking check box.

Office: Customize the Places Bar


  1. Open any Office XP application such as Word etc.
  2. Go to the File menu then select either Save or Open.
  3. Browse to the folder you want added to the Places Bar and select it.

  1. Click on the Tools menu and choose Add to "My Places".

  1. The folder now appears in your places menu.
  2. You can now move it up or down as desired. Right-click the folder in the left pane and select Move Up until you get it to the desired position.

  1. If you have more icons than will fit on the bar, a small arrow appears to indicate there are more icons and you can scroll up or down the list. If scrolling isn't does sound so hot, you can resize the dialog window to show more, made easier if you switch to small icons.

Ubuntu: Sensor install

From https://help.ubuntu.com/community/SensorInstallHowto

Ubuntu can monitor CPU and other system temperatures, fan speeds, and other system data using an application called lm-sensors. It can also show this information on your desktop or GNOME panel using one of several other applications. lm-sensor's homepage is http://secure.netroedge.com/~lm78/download.html

Install and Configure lm-sensors

  1. Install the lm-sensors package
  2. Run sudo sensors-detect and answer YES to all YES/no questions. I generally use the ISA bus rather than the SMBus bus, your choice to this question!.
  3. At the end of sensors-detect, a list of modules that needs to be loaded will displayed. Type "yes" to have sensors-detect insert those modules into /etc/modules, or edit /etc/modules yourself.
  4. Next, run "sudo /etc/init.d/module-init-tools restart". This will read the changes you made to /etc/modules in step 3, and insert the new modules into the kernel.

Test lm-sensors

Next, you should test that lm-sensors works correctly. Run the "sensors" command and check the output. Example output is below:
w83627dhg-isa-0290
Adapter: ISA adapter
VCore:       +1.13 V  (min =  +0.00 V, max =  +1.74 V)   
in1:        +11.30 V  (min =  +0.90 V, max =  +0.05 V)   ALARM
AVCC:        +3.28 V  (min =  +2.11 V, max =  +2.40 V)   ALARM
3VCC:        +3.28 V  (min =  +2.05 V, max =  +0.37 V)   ALARM
in4:         +1.41 V  (min =  +0.00 V, max =  +1.57 V)   
in5:         +1.65 V  (min =  +0.02 V, max =  +0.14 V)   ALARM
in6:         +4.45 V  (min =  +3.28 V, max =  +1.64 V)   ALARM
VSB:         +3.28 V  (min =  +0.14 V, max =  +3.07 V)   ALARM
VBAT:        +3.22 V  (min =  +2.06 V, max =  +1.02 V)   ALARM
Case Fan:      0 RPM  (min = 2636 RPM, div = 128)  ALARM
CPU Fan:    1117 RPM  (min = 1591 RPM, div = 8)  ALARM
Aux Fan:       0 RPM  (min = 1171 RPM, div = 128)  ALARM
fan5:          0 RPM  (min =  659 RPM, div = 128)  ALARM
Sys Temp:    +31.0°C  (high = +18.0°C, hyst = +96.0°C)  sensor = thermistor
CPU Temp:    +33.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = diode
AUX Temp:   +124.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor
cpu0_vid:   +1.163 V

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +43.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +43.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0002
Adapter: ISA adapter
Core 2:      +40.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0003
Adapter: ISA adapter
Core 3:      +43.0°C  (high = +82.0°C, crit = +100.0°C)  
This sensors output shows four devices: w83627dhg-isa-0290 (motherboard sensors) and coretemp-isa-0000 through 0004 (Intel Core sensors). The motherboard sensor device has information on the voltages received from the power supply unit by the motherboard (in1-6), the fan speeds (entries with RPM), and various internal temperatures. As you can see, some sensors are obviously incorrect (e.g. AUX Temp and Case/Aux Fan); this tends to be the case with at least some of the sensors on most motherboards.
The sensor output may be tweaked by editing the "/etc/sensors.conf" file. It is possible to correct inaccurate scaling too. For details check "man sensors.conf".

Get Sensor Information Displayed on your Desktop

Search Synaptic for either "sensors" to bring up a list of sensor-related applications, including xsensors, ksensors, and sensors-applet.

ksensors

Ksensors seems to work better for many people, and be easier to configure. Install the ksensors package. Start it from terminal with ksensors, and you should be able to choose which temperature, fan RPM, or other displays you want.
ksensors.png
To get Ksensors to start when your computer starts, go System menu --> Preferences --> Sessions, and in the last tab, Startup Programs, add ksensors. (or whichever sensors display program you choose to use).

sensors-applet

For a GNOME alternative, you can apt-get or Synaptic search/install of "sensors-applet", a GNOME panel applet that displays temperatures and fan speeds from lm-sensors.
During installation, you'll be presented with the option to start the hddtemp daemon at startup. Choose "no" here if there was a sensor detected previously that reports your hard drive temperature, otherwise choose "yes".
After installation, you can right click on any panel that you want to have sensor information displayed on, and click "Add to Panel...". In the "Add to Panel" window, there should be a icon with the text "Hardware Sensors Monitor". Click on this entry, then click "Add". You can change the applet's settings by right-clicking on the applet and choosing "Preferences".
sensors-applet.png

Ubuntu: Include datestamp in bash history

If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. Defining the environment variable as follows:
$ HISTTIMEFORMAT="%d/%m/%y %T "
OR
$ echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
Where,
%d - Day
%m - Month
%y - Year
%T - Time
To see history type
$ history

Ubuntu: Network Printing from WinXP

1) Make sure your printer is installed.

2) Open the Printing window (System -> Administration -> Printing).

3) Click Server Settings in the list of printers (Server -> Settings).

4) Check the box that reads, "Publish shared printers connected to this system" and then click the OK button.

5) In the list of printers, right-click the printer you want to share and then select Properties.

6) Click on Policies and make sure all three check boxes (Enabled, Accepting jobs, and Shared) are checked.

7) Click the OK button in the lower-right corner of the window.

8) If you have a firewall enabled on the Ubuntu box you will need to allow connections from the Windows machine on port 631. For the ufw firewall the following two rules enables a windows machine on 192.168.5.4 to print

sudo ufw allow proto tcp to any port 631 from 192.168.5.4
sudo ufw allow proto udp to any port 631 from 192.168.5.4

Use the "On the Windows machine" section below in the Gutsy tutorial to setup your Windows machine.

Ubuntu: PuTTY access denied

Modify the /etc/ssh/sshd_config file on the server and change the 'PasswordAuthentication' variable from 'no' to 'yes'.

Then '/etc/init.d/ssh restart' to restart the sshd server.

Ubuntu: Permissions of Folders and Files

To change the folder and all folders beneath it, use the -R flag

Code:

sudo chown -R /folders/files

Will change the ownership of /folders/files to the user
Code:

sudo chmod -R 777 /folders/files

Will change the modes of access (permissions) of /folders/files to read/write/execute for everyone.

Ubuntu: Create a list of installed packages

HowTo: Create a list of installed packages

I found out how to do this recently and thought it might be helpful to some people. To output this information to a file in your home directory you would use,

Code:
dpkg --get-selections > installed-software
And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,

Code:
dpkg --set-selections < installed-software
followed by

Code:
dselect

Ubuntu: Bulk rename

Examples:

Maybe you have a digital camera that takes photos with filenames something like 00001234.JPG, 00001235.JPG, 00001236.JPG. You could make the .JPG extension lowercase with the following command executed from the same directory as the images:

rename -v 's/\.JPG$/\.jpg/' *.JPG

Here is the output of the above command:
 
$ rename -v 's/\.JPG$/\.jpg/' *.JPG
00001111.JPG renamed as 00001111.jpg
00001112.JPG renamed as 00001112.jpg
00001113.JPG renamed as 00001113.jpg

That is simple enough, as it is similar to the .html example earlier. You could also bulk rename them with something descriptive at the beginning like this:

Tip: Before trying more complicated renaming like in the example below, do a test run with the -n option as described at the beginning of this tutorial.

rename -v 's/(\d{8})\.JPG$/BeachPics_$1\.jpg/' *.JPG

That will change filenames that have the pattern ########.JPG (8 numbers and capital .JPG) to something like BeachPics_########.jpg (the same 8 numbers and changing the extension to lowercase .jpg). Here is a test run with the -n option:
 
$ rename -n 's/(\d{8})\.JPG$/BeachPics_$1\.jpg/' *.JPG
00001111.JPG renamed as BeachPics_00001111.jpg
00001112.JPG renamed as BeachPics_00001112.jpg
00001113.JPG renamed as BeachPics_00001113.jpg

Here's a quick breakdown of the Perl substitution with the regular expression above.
The highlighted section below means to count 8 digits. The parentheses mean to save those 8 digits for later because they are going to be used again in the second half of the substitution:

's/(\d{8})\.JPG$/BeachPics_$1\.jpg/'

In the highlighted section below, it adds the string BeachPics, and underscore, and then the text in parentheses from the first half of the substitution. $1 will insert the string from the first set of parentheses that it finds — in this case the 8 digits. If you have more than one set of parentheses you can access the second set with the Perl variable $2 and so on.

's/(\d{8})\.JPG$/BeachPics_$1\.jpg/'

Ubuntu: Delete old thumbnails

$find ~/.thumbnails -type f -atime +7 -exec rm {} \;

This deletes files not accessed in last 7 days 

(can be used for other types of files too)

Mac: Copy files using ssh

Examples:

copy from a remote machine to my machine:
scp user@192.168.1.100:/home/remote_user/Desktop/file.txt /home/me/Desktop/file.txt

copy from my machine to a remote machine:
scp /home/me/Desktop/file.txt user@192.168.1.100:/home/remote_user/Desktop/file.txt

copy all file*.txt from a remote machine to my machine (file01.txt, file02.txt, etc.; note the quotation marks:
scp "user@192.168.1.100:/home/remote_user/Desktop/file*.txt" /home/me/Desktop/file.txt

copy a directory from a remote machine to my machine:
scp -r user@192.168.1.100:/home/remote_user/Desktop/files /home/me/Desktop/.

Mac: Static IP address on iPod Touch

To get a static IP address:
  • Go to Settings > Wi-Fi
  • Then tap on the blue (>) symbol after the name of the wi-fi network you want to connect to.
  • Tap the button Static.
  • Give your iPod Touch its own IP Address, Subnet Mask, Router and DNS.

Mac: Monitor Internet Bandwidth Usage


  1. To get started, download and install SurplusMeter.
  2. Launch it from your Applications folder. The main interface will appear, and you’ll need to make a few adjustments before you’re done. First, select the Connection type: – as the default is PPP modem, and hopefully you have broadband via your Ethernet port or Airport wireless. Because SurplusMeter was actually created with the idea of tracking exactly how much you use the Internet, you can even set a Month starts on date (ie. the first day of your billing cycle) – since that’s how most ISP’s who limit your bandwidth will monitor it. If you don’t actually have a “set in stone” download limit, you can ignore the Download limit: setting, but you may want to make it higher than the 3GB that it defaults to. I set it to 500GB.
    monitor os x
 bandwidth with surplusmeter

  3. And once the Connection type: change is made, you’ll see your total downloads/uploads since SurplusMeter was installed. Click the green button in the upper-left corner.
  4. monitor os x
 bandwidth with surplusmeter
  5. SurplusMeter will go into ‘mini-mode’. You can also quit SurplusMeter entirely, and it will still keep track of your usage. When installed, it actually puts a small program in your start-up items, and it’s that program that really does the monitoring.
  6. monitor os x bandwidth with surplusmeter
  7. If you open your System Preferences, select Accounts and then when your account is highlighted, click Login Items, you’ll notice that SurplusMeterAgent has been added to your start-up items. SurplusMeterAgent is what tracks your usage.
  8. monitor os x
 bandwidth with surplusmeter 
  9. Tip: if you do use Ethernet or Airport, and transfer files across your local network – use the Pause Monitoring button. That will stop SurplusMeter from ‘tracking’ your usage until you un-pause again (and it does track local-network traffic the same way it does Internet bandwidth, which could artificially inflate your usage stats if you don’t use the Pause button).

Mac: Extract audio from DVD

Extracting audio from a DVD using MacTheRipper
  1. Insert the DVD you wish to extract the audio from, and close iDVD (or any other program that may have started when you put in the DVD). Launch MacTheRipper
  2. convert dvd to mp3
  3. Select the Mode tab and then choose Title – Chapter Extraction from the drop-down list
  4. convert dvd to mp3
  5. From the second drop-down list you’ll have to select the “title” you wish to extract the audio from. If the audio you’re going for is somewhere in the “main feature” of the DVD (ie. it’s not in the ‘bonus material’ or ‘extras’ on the DVD), select the title that ends with (MF). If the audio you’re trying to extract is in the bonus features or extras, you’ll need to figure out which “title” to choose. The length of each title (in hours:minutes:seconds) can be very helpful in determining which is the one you want.
  6. convert dvd to mp3
  7. Select the chapter you wish to extract the audio from. You can choose multiple chapters, but they must be sequential (choose a start and end chapter). The more chapters you choose, the longer (and larger) the resulting file will be.
  8. convert dvd to mp3
  9. Now click the D button, and then the Streams button. Remove the check marks from any of the Video Streams (since we’re going for the audio, we don’t need to extract any video). Each DVD will differ on the number and types of Audio Streams available. Remove the check marks from all of the Audio Streams except one – ideally the AC3 6Ch. Make sure none of the Subtitle Streams are checked and then click GO!.
  10. convert dvd to mp3
  11. If this is the first time you’ve used MacTheRipper, you’ll be prompted to save the file somewhere. Choose your Desktop (it doesn’t matter, just remember where you saved the file).
  12. convert dvd to mp3
  13. When the extraction is complete, MacTheRipper will let you know
  14. convert dvd to mp3
Converting the DVD audio to MP3
  1. If you happen to have a media player installed that can play .ac3 files (eg. VLC) you can use it to listen to the file (to make sure you extracted the right one etc). Now we’ll turn the .ac3 into an .mp3, using ffmpegX.
    convert dvd to mp3
  2. Open ffmpegX and drag the .ac3 file into the Drop file here window.
  3. convert dvd to mp3
  4. In the Target Format column, select the small arrow directly next to To. Choose Audio file to mp3 from the bottom of the very large drop-down list. Do NOT choose Movie file to mp3, even if the DVD is a “movie”.
  5. convert dvd to mp3
  6. Now select the Audio tab and choose a bitrate for your mp3. I like to use something a little bit higher than the default 128, but this is a personal preference. Remember, the higher the bitrate, the larger the resulting file will be. Click Encode when you’re ready.
  7. convert dvd to mp3
  8. ffmpegX will display a status window letting you know how things are going
  9. convert dvd to mp3
  10. The status window will change to Finished when it’s done
  11. convert dvd to mp3
  12. If you check the folder where you saved the .ac3 file, you’ll now find an .mp3 as well. That’s it! You can rename the mp3, move it to your Music directory etc.
  13. convert dvd to mp3

Mac: How to mount a Windows shared folder

Set up sharing on your PC. To get this going, make sure your PC is set up for file sharing. In Windows, choose the folder you want to access from your Mac, and right-click to get to its Properties dialog box. From the sharing tab, turn on sharing, and choose a name for the shared folder. (This is the name you'll see on your Mac.)

To be safe, stick with something less than 12. Here, I'm sharing the "My Documents" folder as "PC - My Docs." Also, check the "Allow network users to change my files" if you want to save files to this share from your Mac.
Determine your PC's IP address. You'll need to give your Mac an address to look for this shared folder, so get your PC's local IP address from the command line by running ipconfig. In my setup (shown below), that address is 192.168.1.102. Write that number down.

UPDATE: Several readers have pointed out that you can use your PC's name versus its IP address to connect to it. Using the name is a better method than IP address because the IP can change if it's assigned dynamically, but the name won't unless you change it.
Connect to the server on your Mac. Now, on your Mac, from Finder's Go menu, choose "Connect to Server." Enter the IP address you just obtained from your PC, preceded by smb://, as shown:

UPDATE: To use your PC's name instead of IP address, replace the number with the name. So if your PC's name is "MyWindowsBox", you'd use smb://mywindowsbox (not case-sensitive).
If it finds your server, you'll get prompted to enter your network credentials - by default, your Windows username and password:

Once you're in, you'll get to choose which shared folder you want to mount on your Mac. In this case, we're going to choose the "PC - My Docs" share:

samba-shre.pngAnd you're done! Now the "PC - My Docs" folder will be mounted on your Mac, and accessible from your desktop and in Finder. If you've allowed reading and writing to the shared folder in Windows, you can drag and drop and save files to it as if it were any disk.
This technique comes in very handy for backing up your Mac's data to a PC, too - just set your Mac's backup software destination to the Windows drive.
UPDATE: You can automatically mount your Windows drive every time you login to your Mac by adding it to your Login items. In System Preferences, Accounts, choose the "Login Items" tab and add the Volume to the list of apps that automatically start up.

Mac: Backup Mail.app

Copy the ~/Library/Mail folder If you are using a POP account, the simplest method of backing up your Mail.app data is to simply copy the ~/Library/Mail folder (the tilde [~] represents your home user directory) to a separate backup location -- your .Mac iDisk, a CD-R(W), DVD-R(W), an external hard drive, etc.
Your best bet is to perform this process manually by dragging the folder to its new location, as many back tools have been shown to improperly copy Mail.app's data files and folder structure.
If you ever want to restore mail backed up via this method, simply replace the ~/Library/Mail folder on your new Mac OS X installation with the "Mail" folder you've backed up to a separate volume.

Mac: Mail from Thunderbird to Mail.app

Found here - http://rian76.blogspot.com/2007/02/import-mails-from-thunderbird-to-apples.html

These are the key parts - basically, Mail.app doesn't seem to want to download all from Thunderbird. There is a droplet called Mboxfix.app.zip to download, then these steps:
  1. Go to your Thunderbird mail dir (on windows it's probably c:\Documents and Settings\ YourUsername\ Applications\ Thunderbird\ Profiles\ default\ StrangeChars\ Mail, and on Mac its most likely /Users/ YourUsername/ Library/ Thunderbird/ Profiles/ default/ StrangeChars/ Mail. (I've inserted blanks for better line wrapping results))
  2. For each mail folder there are three files or folders, e.g. Inbox, Inbox.msf, Inbox.sbd. Only the Inbox (without extensions) is important. Copy those files (one for each mail folder) to your desktop as well.
  3. Drag these files onto the droplet 
  4. This creates the files Inbox.mbox, Sent.mbox, Private.mbox and Office.mbox
  5. Open Mail, go to "Import Messages", select "Import from Other", and point it to your desktop. Make sure to import only the files with the ending .mbox
Works very nicely!

Mac: Extracting lyrics, saving

#

tell application "iTunes"
    set sel to selection
   
    repeat with this_track in sel
        set the_lyrics to this_track's lyrics
        set {art, alb, nom} to {this_track's artist, this_track's album, this_track's name}
        if the_lyrics is not "" then
            set theName to (art & " - " & alb & " - " & nom)
            set theDocumentPath to (("/users//documents/music/lyrics/") & theName & ".txt") as string
            log the_lyrics
            set theCommand to "echo " & quoted form of the_lyrics & " > " & quoted form of POSIX path of theDocumentPath
            do shell script theCommand
        else
            beep
        end if
    end repeat
end tell

Mac: Doug's AppleScripts

Some very helpful scripts here. My favourites:

No Lyrics to Playlist


Album Art to Folder


Proper English Title Capitalization

Mac: Halt Growl Notifications

Just type "Growl" into Spotlight and click the prefs icon in the Spotlight list. The Growl master switch and the "Hide All Notifications" checkbox then appear right away.

Mac: Gmail Notifier check interval

You can adjust the interval by clicking on the mail icon and then holding down the Command and Option keys while clicking on Preferences. This will pop open a box for a key/value pair. Use AutocheckInterval as the key (case-sensitive) and then set the interval (in minutes) for it to check as the value.

Mac: Remove Windows files

1. Spotlight
2. Type Thumbs.db into the search box and show all the results. Make sure the search source is set to "Computer." Select all the results, and drag them into the Trash.
3. Ditto for Desktop.ini

Mac: Boot verbose mode

sudo nvram boot-args="-v"

Mac: Force app to open file

Drag the file onto any application icon with the Command and Option keys held down. That way, the Finder will force the app to open the file. This works with items in your dock, or just with an open Applications folder in the Finder.

Mac: Maintenance Scripts

At the Terminal prompt, type the following, exactly as written:
 
sudo periodic daily weekly monthly
 
Press Return.

Type your Admin password when prompted, then press Return.
 
All three scripts will run in sequence. There is no visual feedback while the scripts execute. You will know they are completed when the Terminal prompt returns.

You can also run the scripts individually. For example, to run just the daily script, you would type the the following command in step 2:
  • sudo periodic daily

Mac: Hidden Files and Directories

._whatever These files are created on volumes that don't natively support full HFS file characteristics (e.g. ufs volumes, Windows fileshares, etc). When a Mac file is copied to such a volume, its data fork is stored under the file's regular name, and the additional HFS information (resource fork, type & creator codes, etc) is stored in a second file (in AppleDouble format), with a name that starts with "._". (These files are, of course, invisible as far as OS-X is concerned, but not to other OS's; this can sometimes be annoying...)
.DS_Store This file in created by the Finder to keep track of folder view options, icon positions, and other visual information about folders. A separate .DS_Store file is created in each directory to store information about that directory, so you'll find them appearing all over the directory tree, in pretty much every folder you've visited with the OS X Finder.
~/.Trash Used to store files & folders from the boot volume that a particular user has thrown in the trash, but that haven't been erased yet.
/.Spotlight-V100 Used to store metadata indexes and indexing rules for Spotlight (version 1.00 apparently). Only created under Mac OS X 10.4.
/Volumes/(whatever)/.Trashes On volumes other than the boot volume, a .Trashes folder is used to hold files & folders that've been put in the trash but not yet deleted. Since each user has their own personal trash can, subfolders are created under .Trashes for different users, named according to their user ID number. For example, if user #501 throws something on a volume named "Data" into the trash, it'd be moved to a directory named /Volumes/Data/.Trashes/501/.
Permissions on this folder are set so that you can only access a trash can if you can guess the users' ID -- that is, you cannot view a list of which users actually have trash cans in existance. If you're trying to free disk space, this can make it rather tricky to find & delete the files in other users' trash cans...
/.hidden This contains a list of files for the Finder to hide -- it's one of three ways a file can be made invisible in OS X. This file is semi-obsolete -- i.e. it does not exist in a standard installation of Mac OS X 10.4, but the Finder will still respect it if it exists...
/.hotfiles.btree Used to track commonly-used small files so their position on disk can be optimized (a process called "adaptive hot file clustering").
/.vol This pseudo-directory is used to access files by their ID number (aka inode number) rather than by name. For example, /.vol/234881034/105486 is file #105486 on volume #234881034.


/bin This is one of several places where unix-style binaries (that is, programs, or command-line commands) are kept. The programs in /bin include the more common and fundamental things that are used from the unix command line (e.g. ls and rm), as well as several shells (the programs that provide the command line itself).
The other places where similar files are stored are /sbin, /usr/bin, /usr/sbin, and possibly /usr/local/bin, /usr/local/sbin, and maybe even ~/bin/powerpc-apple-macos; collectively, these can be thought of as the command line's equivalent of /Applications.
/cores (This is actually stored in /private/cores; /cores is really just a symbolic link.)
Under some conditions, when a program crashes, it'll "dump core" (essentially, store a copy of the program state at the time it crashed) into this directory. This is really only useful for programmers trying to debug their own programs.
/dev This directory contains what're technically known as device special files. These are not really files in the usual sense, they're more like placeholders that the system uses to keep track of the devices (disks, keyboards, monitors, network connections, etc) attached to it.
/etc (This is actually stored in /private/etc; /etc is really just a symbolic link.)
On a typical unix system the /etc folder will contain all the configuration files for a system, including both documents specifying config information as well as scripts for actually performing various configuration tasks. On OS X, some of the config information stored here is overridden by NetInfo or other directory services, but the /etc files still exist.
/lost+found If Disk Utility or fsck discover "orphaned" files (i.e. files that exist, but aren't actually in any directory), they'll be placed here.
/Network This is the "real" location of the Network item that appears at the Computer level in the finder. It provides a place to attach network-wide resources and server volumes.
/mach
/mach.sym
/mach_kernel
The Mach kernel (which runs at the very core of Mac OS X), along with a couple of shortcuts for getting at it in various ways.
/private In OS X certain root level directories are actually symbolic links (similar to aliases) to directories in /private. Examples are /cores, /etc, and /var which are respectively linked to /private/cores, /private/etc, and /private/var. /private also contains a directory of drivers for certain peripherals.
/private/Network Used to handle "network" (non-static) mounts of network volumes under OS X 10.1. Under previous versions, network mounts were mounted in /Network, but in 10.1 they're actually mounted in /private/network, and a symbolic link is placed in /Network pointing to the actual mount point.
(Compare this with how "quasi-static" mounts are handled via /automount.)
/sbin The /sbin directory is like /bin except it contains binaries that are specifically used for system administration (e.g. mount and fsck).
/tmp (This is actually stored in /private/tmp; /tmp is really just a symbolic link.)
Programs that need temporary space on the hard disk are usally set up to write temporary files to the /tmp directory (although some use /var/tmp instead).
/usr The /usr directory contains many subdirectories that have binaries and files specifically of use to the normal (unix) user.
/usr/bin Another place where unix binaries are kept.
/usr/lib Libraries available for use by progrmming on Mac OS X. Unless you install the Developer Tools, this'll be mostly empty.
Note that this has no relation to Mac OS X's various "Library" directories."
/usr/libexec Holds various daemon programs, system maintenance scripts, and other unix-style programs that usually aren't run directly by humans.
/usr/local As in most unixes, this directory is used to store local customizations and additions to the standard OS installation (e.g. /usr/local/bin would be likely to hold unix binaries added by the system administrator). This directory can be thought of roughly as the unix equivalent of Mac OS X's local library. In the standard install of Mac OS X it is (not surprisingly) completely empty.
Note: As of OS X 10.2, these directories are no longer in the default search path for command-line executables; as a result, anything installed here will not be useable without taking extra steps of one sort or another.
/usr/sbin Yet another place where unix binaries are kept.
/usr/share Contains various data and text files that can, in principle, be shared by multiple architectures (a distinction which makes a lot more sense under other flavors of unix than it does under Mac OS X).
/usr/standalone Contains boot loader programs for (potentially) various computer architectures. In the installs I've looked at, this is simply a duplicate of the BootX loader (also found in /System/Library/CoreServices/BootX); I'm not sure why both copies are needed.
/var (This is actually stored in /private/var; /var is really just a symbolic link.)
Sometimes processes controlled by the operating system need a place to store variable files. Processes like printing and programs that store log files will use subdirectories in the /var directory to store those files.
It also holds a fair bit of configuration information (especially in /var/db).
/var/backups Used to store backups of critical system information (mainly, the nightly dumps of NetInfo databases).
/var/db Holds various databases of system information. The most notable are the NetInfo databases (stored in /var/db/netinfo), shadow password files (in /var/db/shadow/hash), and the system's network configuration database (/var/db/SystemConfiguration/preferences.xml - although it moved to /Library/Preferences/SystemConfiguration/ in 10.3), which together store much of the system and network configuration information that a traditional unix admin would expect to find in /etc, and a Mac OS 9 admin would expect to find in System Folder:Preferences.
/var/log This is where many of the system event logs are kept (others are kept in /Library/Logs).
/var/root The root (superuser) account's home directory. Note that this directory will exist even if you haven't enabled the root account.
/var/run Stores various status information about processes (especially daemons) running on the system.
/var/tmp A place for programs to store temporary data, just like /tmp. Some programs use one, some use the other, so Mac OS X provides both.
/var/vm Used to store the swap files for Mac OS X's virtual memory.
/var/vm/app_profile Holds information about various applications' virtual memory useage.
/Volumes The /Volumes directory is the mount point for all of the drives (other than the boot volume) connected to the system. The Finder hides the Volumes directory itself, but displays its contents at the Computer level.

Mac: Trash Problems

Force the Trash to empty using the Option key

This technique uses a hidden feature of Mac OS X to force the Trash to empty. Perform the following steps in the order specified:
  1. Press and hold the mouse button on the Trash icon in the Dock. The context menu for Trash will display.
  2. Press and hold the Option key.
  3. Select Empty Trash from the context menu for Trash.
  4. Release the Option key. 

Moving locked files to the Trash

Locked files display a lock badge in the lower-left corner of their icons. Under Leopard, the lock badge only appears if Show icon preview is deselected in the View Options (View > Show View Options) of the Finder window containing the locked file.
Use the following procedure to unlock a file so that it can be moved to the Trash.
  1. Open the Get Info window for the file by either:
    1. Selecting the file’s icon in Finder and pressing the Command-I keyboard combination.
    2. Control-clicking the file’s icon in Finder and selecting Get Info from the file’s context menu.
  2. In the General panel of the file's Get Info window, deselect the Locked checkbox. The check mark will disappear, indicating the file is now unlocked.
  3. Close the Get Info window for the file.
  4. Trash the file.

Mac: Neo Office - merge columns

From http://neowiki.neooffice.org/index.php/Merging_Columns_in_NeoOffice_Calc



You can merge two or more columns in a spreadsheet without merging them cell by cell. In order to do that, proceed as follows:

  • Copy (Cmd-C) the content of the columns you want to merge
  • Open a new Calc document
  • Paste (Cmd-V) the content of the columns
  • Save the document in .csv format
    • Choose Text CSV (.csv) in the pop-down File type menu
    • Check Edit filter settings
    • Choose a name and a location for your file
    • Click Save
    • Press Yes to close the "may loose formatting" dialogue
  • In the Export of text files window, choose "{space}" in the Field delimiter field, and leave Text delimiter set on: "
  • Click OK
  • Open the .csv file you just created
  • In the Text Import window, in the Separated by section, uncheck Space (if it's checked). All the checkboxes have to be unchecked.
  • Click OK
  • A spreadsheet appears, in which the columns are merged
  • Go to the Edit menu, and choose Find and Replace
  • In the Search for field type: "
  • Leave the Replace with field empty
  • Click on Replace All
  • Copy this column and paste it into your initial document
This method applies to any number of adjacent columns.