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:
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
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):
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.
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.
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.
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.
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.
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
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.
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:
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.
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.
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 :
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.
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?
Terminal.apprm -rf
Until now, I've already collected and posted around 60 Terminal commands that can be used to tweak your Mac preferences; There are :
Those are quite difficult to remember. But these next 5 Terminal command utilities must be easy to remember:
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.
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.
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.
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &
defaults write com.apple.dock mouse-over-hilte-stack -boolean YES killall Dock
I'm glad to see that our Leopard Dock got a new look.
Let's recall what our old Tiger Dock looks like..


Leopard packs Terminal differently in such a way that it will definitely increase your productivity.
Let's see our Terminal way of saying by our old Tiger, in which I discussed in my other article Styling Terminal


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