Force Empty Trash Through Terminal

Force Empty Trash Through Terminal By Carl Grasso

Last week I took a support call from a woman having trouble emptying the trash on her Mac. She kept getting an error message saying that the item could not be deleted. Often the cause of this is an application or process that is still running and using that file. Other times it is because of permission problems. In both cases, where restarting the machine doesn’t help, I’ve found that securely emptying the trash will solve it. In her case, it didn’t work.

The solution was found in Terminal, the Mac command line utility. For the majority of Mac users you’ll never use this app—it will sit in your Utilities folder gathering digital dust. In truth, this is a good thing, as reckless use of Terminal can lead to some pretty serious consequences for your operating system. Though if you have the basics down, you can do a fair amount with your machine by bypassing the graphic interface that we all know and love. To delete your trash through Terminal, enter or copy and paste the following command line exactly:

sudo rm -rf ~/.Trash/*

To delete another user’s trash (user_name is the user’s short name) enter or copy and paste:

sudo rm -rf /Users/user_name/.Trash/*

Once entered, you’ll be asked for your administrator password and your trash will empty. If you have a large amount of files in there, it may take a bit. This command only works for trash contained on the root drive; any external or secondary volume connected would have a different path. In that case, the command line would be:

sudo rm -rf /Volumes/DriveName/.Trash/*

These commands will work for OS 10.5 and 10.6; I’m unsure of whether or not they will work with anything older than 10.5. It’s also entirely possible that upon the release of Lion, this solution will no longer work. Apple has changed some of the commands used in Terminal between 10.5 and 10.6, and could continue to change commands as the OS evolves. I have found that periodically the Trash icon on your dock will still look like it’s full even though the formerly stuck files are gone. Just right click and empty trash, and it will now look empty. Use this information at your own risk!

Selecting Java Version on Mac OSX 10.5 (Leopard)

Selecting Java Version on Mac OSX 10.5 (Leopard)

Java Preferences (Macintosh)

I just downloaded the latest version of the wonderful, realtime SNMP monitoring application, asithappens. I'd had some problems getting the last few 0.5x versions to run properly but hadn't bothered to track down what was going on because the older version did what I needed. This morning a new feature, which allows you to monitor any OID, piqued my interest and I persisted.

I grabbed some debugging information and fired it off to Mark Abrahams, the developer. This evening when I got home from Wellington's first Python User Group I had a response from Mark saying that the problem was probably because I was using Java version 5 instead of 6 and that if I couldn't upgrade the work around is to add “device.ports.ifalias = 0” to the “asithappens.properties” file.

With a hunt around my Mac I found an application I'd never noticed before, “/Applications/Utilities/Java Preferences”. Running it clearly shows that Leopard has both version 5 and 6 installed but that version 5 was the default. To change all I had to do was go to the “General” tab, then under the “Java application versions” section drag “J2SE 5.0” below “Java SE 6”.

Nice! I like it when there are simple solutions. Thanks to Mark for writing awesome software and supporting to so graciously. Thanks Apple for making this change easy.

via Selecting Java Version on Mac OSX 10.5 (Leopard).

Pipe threads on a lathe – Practical Machinist – Largest Manufacturing Technology Forum on the Web

Bruce Nelson Aluminum  Join Date: Feb 2009Location: WisconsinPosts: 114

Set the taper attachment at 3/4 inch per foot taper. First machine a taper on the end of the pipe to the dimensions given in Machinerys Handbook. Then set the quick change gearbox to the number of threads per inch required. Then, cut the thread to fit whatever gage you have, or to specs given in the Handbook. Be prepared to withdraw the threading tool with the cross-feed handwheel at the end of the thread.If the thread is for common pipe joining use, machine the thread to a depth where the flat on top of the thread crest just disappears. If you dont have a sharp on the crest of the thread, the thread wont seal when internal pressure is applied.Threads for mechanical fasteners should have a flat on the crest of the thread equal to on-eighth the pitch. There should be no flat on the crest of a pipe thread, which are meant to be self-sealing. Note that when you cut 11 1/2 TPI, you will need to engage the threading dial on the same number.Metric threads would require transposing gears. I have never cut metric pipe threads before, but I would think that you would have to reverse the spindle at the end of the cut to return the tool to the beginning of the cut. or have a lathe that cuts metric threads Lord Byron

via Pipe threads on a lathe – Practical Machinist – Largest Manufacturing Technology Forum on the Web.