UsingMac.com

Mac Tricks and Tips, Wallpapers and Applications for Mac Users

Daily Trick 42. Quick Terminal Command

If you're fans of single-liner for UNIX command, you can always use this quick Terminal command line execution trick to save the steps for executing Terminal command.

Here are the steps:

  1. Ctrl-Click on Terminal icon sitting on your Dock
  2. From the pop-up menu, choose New Command…
  3. Type the command line you want to execute on the appearing window pane
  4. And click on Run button for command line execution

With this trick, I am sure you can start to tweak around with simple command line, e.g. command line for New List View.

Categories: Daily Tricks
Tags: Terminal

Subscribe to RSS Leave a Comment (81)

Emacs. Bizarre Findings

Contribution of Josh Sand

I have been digging around in /usr/share/emacs/22.1/etc/ recently, and I have found it is chock full of goodies, and possibly worth of an article on UsingMac.

Files I have found (put line in Terminal):

Read More Leave a Comment (20)

Safari 4 Beta. New Features and Tweaks

I feel impressed on many new features of Safari 4 and I believe you feel the same. However, some of the features are not essential for us and may even break our usual workflow. This creates the urge to disable some of the features.

In this article, we will discuss with you new features of Safari 4, as well as Terminal command lines that can be used to disable these new features.

Read More Leave a Comment (40)

Twiddle with Terminal Command Prompt

The tendency to use Terminal seems obvious to most Mac users. Unlike many others, today we are going to go through some fun stuffs with Mac Unix Command, with the way we use Terminal.

Read More Leave a Comment (41)

Telnet's ASCII Animation: Star Wars

Contribution of Erik Thorne

For all fans of star wars, by connecting to telnet via Mac OS X Terminal an ASCII animation of Star Wars can be watched. It’s suspected that someone out there is extremely bored with his job or has too much spare time to spend on creating this ASCII animation (also named as 20th century text).

“This is the coolest thing ever”, claimed Erik Thorne himself.

Let’s try out this and see whether Erik is correct.

Read More Leave a Comment (20)

Terminal Kills Process

Besides using Force Quit Applications to kill crashing or freezing applications, Mac users can also use Terminal to kill these persistent processes.

Like execution of End Process Tree in Windows Task Manager, using Terminal command to kill running process leads to the same effect (but in Terminal way).

Waste no more time, let's begin the assassination.

Read More Leave a Comment (26)

Fun with Terminal

Indeed, there are many easter eggs inside your Terminal, but I believe these Terminal command lines will make you smile as it's really fun to play around with. And for some, I am sure you've never seen them before.

Birth Token

cat /usr/share/misc/birthtoken | grep [month]

This Terminal command line will show you what is the birth flower and birth stone for the given birth month, instantly.

$cat /usr/share/misc/birthtoken | grep Jan
January:Garnet:Carnation

Meaning of Flowers

cat /usr/share/misc/flowers | grep -i [flower-name]

Do you know that Camelia means reflected loveliness? Terminal knows it.

$cat /usr/share/misc/flowers | grep -i Clover
Clover:Be mine.

Read More Leave a Comment (21)

Terminal, Ruby and Quote of the Day

Maybe you're curious about the title. Let me explain it in a brief and short way: with Ruby already installed on Mac, you can install a ruby script to grab Quote of the Day into your Terminal.

Perhaps it sounds difficult for you, but actually it's really easy. Everyone can definitely do it.
Here are the steps:

Read More Leave a Comment (21)

Screen Capture a Window

We all know that by using Shift Command 3 we can take the capture the whole screen and using Shift Command 4 we can select the region to be screen captured.

Capturing Screen Window

There is a hidden trick behind screen capture, if you're pressing Shift Command 4+Spacebar, you will be able to capture a window hovered by your mouse along with the shadow.

You can also capture your menu bar, Dock and even additional menu extras of your Mac. I think you should try it. It's fun.

Screen Capture

Read More Leave a Comment (32)

Terminal Sings Songs

Just a quick tip, with a your Mac built-in voice, you can make your Mac sings several nice songs with Terminal.

say -v Good oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Is it nice? Do you want more? Don't worry, there is more songs ahead for you to enjoy, especially during your most boring time. You know what I mean.

say -v Bad oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Maybe you feel the lyric is a little bit boring? All o's like that. Let's use a little bit creativity.

osascript -e 'say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"'
osascript -e 'say "Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm" using "Pipe Organ"'
osascript -e 'say "Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm" using "Hysterical"'

I don't like this one above. It's just because it's too long.

osascript -e 'say "oh This is a silly song silly song silly song this is the silliest song ive ever ever heard So why keep you listening listening listening while you are supposed to work to work to work to work its because i hate my job hate my job hate my job its because i hate my job more than anything else No its because youve no life youve no life youve no life and you better go get one after forwarding this crap" using "cellos"'

You can Triple-Click on the displayed command line to highlight the whole line.
Special thanks to :

  1. MacRumors for the 1st, 2nd and 3rd songs
  2. The Unofficial Apple Weblog (TUAW) for the 4th and 5th songs
  3. The commentor Jérémie for the last song

Categories: Audio, Popular
Tags: Terminal

Subscribe to RSS Leave a Comment (197)

Add Welcome Message to Your Mac [Terminal]

In your Mac login window, you can add a welcome message right below the Apple and System Status. You only need to perform this following command line:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hi, I am Mac"

Characters inside double quote will be displayed as your welcome message. I know you will try this and I also know that you will want to delete it as soon as you've finished trying. So, here is the command line to delete your Mac welcome message:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""

Someday, you can consider putting your username and password as the welcome message. No one will know, except me, you and other readers of UsingMac.com.

Read More Leave a Comment (3)

Delete Files without Going to Trash Folder

Warning: The deleted files are not recoverable.

This is just a simple and quick UNIX tip to delete files without going to trash folder first. What are the steps?

Delete Normal Files

  1. Open Terminal.app
  2. Type rm -rf
  3. Highlight files/folders you want to delete
  4. Drop them all to Terminal
  5. Execute it (pressing Return)

Read More Leave a Comment (12)

5 Most Useful Terminal Command Utilities

Until now, I've already collected and posted around 60 Terminal commands that can be used to tweak your Mac preferences; There are :

  1. Leopard Tweaking - Terminal Codes
  2. Leopard - Terminal Commands for Desktop
  3. Leopard Tweaking - Another Terminal Commands
  4. Change Terminal Focus with Mouse Over

Those are quite difficult to remember. But these next 5 Terminal command utilities must be easy to remember:

Read More Leave a Comment (66)

Change Terminal Focus with Mouse Over

Activate

Searching around the web, I got this nice feature for your Terminal: you can change focus between Terminal windows with simple mouse over window. Here is the command line :

defaults write com.apple.terminal FocusFollowsMouse -string YES

Of course, big screen Mac user has the advantage here because this feature only move the focus without moving active Terminal window.

Read More Leave a Comment (15)

Leopard Tweaking - Another Terminal Commands

I've written several entries of Terminal commands. I collected all of them inside tags named Terminal; Feel free to look at them. Since I've got brand new Terminal commands inside my collection, I would like to share inside this article.

Desktop : Login Picture

Set Login Picture

defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture "/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png"

I use vortex.png for this sample command lines.

Read More Leave a Comment (32)

Leopard - Terminal Commands for Desktop

Make Screen Saver as Desktop Background

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &

Read More Leave a Comment (46)

Leopard Tweaking - Terminal Codes

Dock

Stacks, Activate Mouse Over Gradient

defaults write com.apple.dock mouse-over-hilte-stack -boolean YES
killall Dock

Read More Leave a Comment (666)

Leopard Take A Look - Dock

I'm glad to see that our Leopard Dock got a new look.

The Old and The New

Let's recall what our old Tiger Dock looks like..

And if we contrast it with our brand new 3D Leopard Dock..

Read More Leave a Comment (0)

Leopard Take A Look - Terminal

Leopard packs Terminal differently in such a way that it will definitely increase your productivity.

Old Tiger's Terminal

Let's see our Terminal way of saying by our old Tiger, in which I discussed in my other article Styling Terminal

Read More Leave a Comment (0)

Styling Terminal

Increasing your productivity and your interest in using Terminal can be started from customizing and styling your Terminal.

Terminal Inspector

Terminal Inspector will be needed to customize your Terminal. To show up Terminal inspector, you can either pressing Command-I when you're inside Terminal or tracing through menu bar File → Show Info.

Read More Leave a Comment (0)