Useful command line tips for programmers and Mac managers

Useful command line tips for programmers and Mac managers

Summary: A community site offers a growing list of Mac OS X tips and tricks that require digging into the Terminal. Some very useful, others just for fun, the tips are ranked and commented.

SHARE:

A community site offers a growing list of Mac OS X tips and tricks that require digging into the Terminal. Some very useful, others just for fun, the tips are ranked and commented.

The Terminal Tips & Tricks list is located at Super User, a collaboratively-maintained Q&A site.  Some of the tips use apps and services found in the Mac OS X standard installation, while others may require a program from the Xcode Developer Tools package, which is an optional installation found on the system DVDs that come with the Mac.

The top five tips target the following commands (in order):

pbcopy and pbpaste echo opensnoop say mdfind

Now, I prefer GUI tools over entering strings into the command line, after all, this is the Macintosh, the platform that popularized the graphical user interface. Still, there are times when running a Unix-based Mac OS X, that even Mac users will want to look under the the shell's hood. Even me, on occasion.

Topics: Apple, Hardware, Operating Systems, Software

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

16 comments
Log in or register to join the discussion
  • Drag and drop cd

    The easy way to navigate to a particular directory is to enter "cd " then drag the target folder onto the terminal window. Terminal completes the command line, press enter and persto, you change to that directory.
    Fred Fredrickson
  • Actually, Windows popularized the GUI

    [i]this is the Macintosh, the platform that popularized the graphical user interface[/i]

    [b]Far[/b] more people were introduced to a computer GUI through Windows than Mac OS. Therefore, it is Windows that popularized the GUI. Thanks for playing! :)
    NonZealot
    • Awwww.... Zealot gets butt-hurt... again

      @NonZealot

      Apple legally purchased the Gui from Xerox, and Apple made the GUI so popular, that Microsoft stole it... And somehow got away with it... You lose... Thank YOU for playing.

      Does the real truth give your butt a great big owie?
      i8thecat
      • The question is: Who popularized it?

        @i8thecat
        The answer is: MS. Who was first or who bought what from who or who stole what from who is a different question and we can both have different opinions on that one. The [b]fact[/b] remains that it was MS, not Apple, that popularized the GUI.

        And what is your fascination with butts?
        NonZealot
      • RE: Useful command line tips for programmers and Mac managers

        @i8thecat <br><br>Apple was working on the GUI they got from Xerox when Jobs decided to show it off to Gates. Gates went back to his crew and got them going on a similar path. MS was already working on their GUI when Apple released theirs. MS's GUI came out as Windows and OS/2. The collaboration between MS & IBM over OS/2 fell apart, but Apple's GUI, in the form of the Mac, was not all that popular, given the cost of a Mac. It took MS's Windows 95 on a PC to make it popular. With the release of Windows 98, it became more popular. With the release of XP, it became even more popular. If anything, Apple owes MS for much of their success.<br><br>Now that I've corrected the silliness of your revisionist history, we can move on.
        Dr. John
      • Quote of Jobs

        @i8thecat & @NonZealot: Steve said famously in 1997 (I believe) that "as far as [he is] concerned [the battle] between Microsoft and Apple is over". But their users still seem to battle on...

        In the end you use what YOU like.

        For the record, I've owned a number of Macs and used my last home PC around 2000. I get my daily dosage of Windows at work - that's enough for me.
        invenio
      • ignore him

        Certain people aren't worth the dignity of a reply.
        Laraine Anne Barker
      • RE: Useful command line tips for programmers and Mac managers

        @DrJohn

        "Gates went back to his crew and got them going on a similar path."

        You mean Interface Manager?

        Microsoft MAY have started on it before they saw the Mac prototype. But did they start on it before the LISA in 1983?

        The idea at the time was that the LISA would be the professional version, and the Mac would be the runtime-only version. Like today's iPad, more for content consumption than content creation.

        "But when Sculley saw the software, he was enraged. Microsoft had been provided early prototypes of the Macintosh and some source code to help optimize Word and MultiPlan. Now Windows had a menu bar almost identical to Apple's. Windows even had a 'Special' menu, containing disk operations. Other elements were strikingly similar. Windows came bundled with Write and Paint, both mimicking Apple's MacPaint and MacWrite."

        You left out the bit about Gates demanding a license for Mac OS or he'd stop production of Mac software.


        "Bill Gates supposedly called Sculley personally and told him that if Apple was going to sue Microsoft, "I want to know it, because we'll stop development on all Mac products."

        Sculley caved. And he made the worst mistake he could have. He granted Microsoft a license.

        The eventual lawsuit dragged on for years. And Apple lost, because of that license.



        http://lowendmac.com/orchard/06/apple-vs-microsoft.html
        Jkirk3279
    • RE: Useful command line tips for programmers and Mac managers

      @NonZealot So? Because OS X is unix there is more power in the command line than in Windows. Something even a shill like you isn't even aware of.
      I12BPhil
      • LOL, I love your proof!!

        @I12BPhil
        [i]Because OS X is unix there is more power in the command line than in Windows[/i]

        LOL!! That is your proof? LOL!! Here is my rebuttal:
        [i]Because Windows is Windows, there is more power in the command line than in OS X.[/i]

        LOL!!

        Just because *nix has placed more emphasis on the command line than Windows has in the past, doesn't mean that things don't change. A few years ago, MS realized that they needed to improve the scripting capabilities of their OS. Did they play catch-up to *nix? Sure. Did they surpass *nix? Many would say that PowerShell is a vast improvement over the *nix way of doing things. At a minimum though, MS has brought Windows to a place where there is nothing that can't be managed using CLI only. Full thanks to *nix for showing MS the way. Full thanks to MS for constantly improving.

        Just a little food for thought since you are probably totally uneducated: there is even a release of Windows that is pretty much command line only.
        http://www.petri.co.il/understanding-windows-server-2008-core.htm
        NonZealot
    • RE: Useful command line tips for programmers and Mac managers

      @NonZealot

      Actually it was the mac and more specifically word & excel on the mac and laser printer. Back in the old days when I introduced the mac SE ( 9 inch black and white screen) to my office. Now the rest of the office had DOS and 15 inch color screens. Yet they would line up to work on the Mac because it was just easier to make documents look pretty. That is the reason lotus 123 went to a graphic interface and shortly there after disappeared because the interface sucked. Microsoft saw the future and went after it. Though the first three versions of windows tended to suck. By windows NT they seem to have gotten their act together.
      cradulich
      • No, Windows POPULARIZED the GUI

        @cradulich
        I didn't say invented, I didn't say they were first, I said [b]popularized[/b]. More people were introduced to the GUI through Windows than through Mac OS. Therefore, Windows gets credit for popularizing the GUI.
        NonZealot
    • RE: Useful command line tips for programmers and Mac managers

      @NonZealot

      Ah, so that means McDonalds 'popularized' the hamburger because they sold more of them?

      Funny, I THINK the hamburger was pretty popular before ol' Roy got started.
      Jkirk3279
  • RE: Useful command line tips for programmers and Mac managers

    See Origin of GUI at: http://www.linfo.org/window.html
    "Further work was carried out on windows at Xerox Palo Alto Research Center (PARC), which was established in 1970 by Xerox Corporation in Silicon Valley near SRI. Among PARC's many breakthroughs were the GUI and the first desktop computer, the Alto, which was also the first computer to use a GUI (including primitive windows).
    The first commercial use of windows was on the Macintosh personal computer, which was introduced in 1984. This came about as a result of a now famous 1979 visit by Steve Jobs, Apple's co-founder, to PARC where he was highly impressed by the numerous (about 150) Altos in use there. In addition to overlapping windows, the Macintosh's GUI also featured icons, pull-down menus and a mouse.
    Microsoft announced that it was developing a GUI personal computer in November, 1983. The initial version, dubbed Microsoft Windows 1.0 and released in November 1985, made use of windows, although they were not overlapping and there were no icons. The much-improved Windows 2.0, which was released two years later, incorporated icons and had windows that could overlap. Today windows are used by most computer operating systems, not just the Macintosh and Microsoft Windows.
    dutchess2008
  • RE: Useful command line tips for programmers and Mac managers

    It would have been a hoot, if Xerox had put a patent on GUI.
    blackjack861
    • RE: Useful command line tips for programmers and Mac managers

      @blackjack861@...

      It's odd, if they didn't. Apple bought a license for it anyway.

      When Xerox tried to sue and prove their prior art they failed, somehow.
      Jkirk3279