Stand by...

Archive for the ‘Command Line’ Category

Updating /etc/hosts on OS X

Sometimes you need to have a static IP address configured to a specific domain name on OS X. For instance, locally testing a web server is a great reason to do this. Doing so is fairly easy to setup, but does take a bit of command line work. First, edit /etc/hosts with your favorite text [...]

How To: Force Safari to Download PDF Files

I hate having my Internet Browser display PDF files when I click on them. I much prefer them to be downloaded. Here are two commands that changes this default behavior. in terminal (as Admin or Root user) type: defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES Essentially you’re removing PDF Support from Safari so that it doesn’t [...]

How To: Update Locate database

Here is the command used to update the Locate Database. /usr/libexec/locate.updatedb

Linux: Printer Commands

Using the Printconf command (Printer Configuration) Install printer: printconf To see printers: lpstat -p After configuring printers, export printer settings to another machine: printconf-tui –Xexport > printers.ppd Copy file to new computer then import: printconf-tui –Ximport < printers.pdd After setting up printers restart cups. service cups restart

How to: fix invalid /LABEL=xxx

After getting invalid /LABEL=xxx Boot into single user mode: Type in Root password type: “mount -w -o remount /dev/device” type: “vi /etc/fstab” remove or comment out (# in front) offending line type “:wq!” (quit VI) type “reboot”