commandline

Latest

  • Tenor/20th Century Fox

    Google's Tenor slips GIFs into your command line interface

    by 
    Jon Fingas
    Jon Fingas
    06.14.2018

    If you live in the command line, you probably like to give that otherwise plain interface your own distinctive touch, like ASCII art. But wouldn't it be nice if you could spice it up with a GIF? You can now. Google's Tenor team has released a GIFs for CLI tool that, as the name implies, turns short videos and GIFs (including those sourced from Tenor's search toolkit) into animated ASCII art you can use as a greeting when you open your terminal. The Deadpool 2 skydive you see above is in black and white, but you can include GIFs in glorious color.

  • Google makes its essential Android modding tools easier to get

    by 
    Sean Buckley
    Sean Buckley
    01.06.2017

    Android users have a long history of unlocking their phones, sideloading apps and installing custom OS builds -- but getting the tools to do all that has always been kind of a pain in the ass. Users who wanted to play around with their phone's backend had to download the entire Android SDK just to get access to two specific tools. Not anymore. Google has quietly released its ADB and Fastboot tools as lightweight, independent packages.

  • Linux command-line tools are coming to Windows 10

    by 
    Jon Fingas
    Jon Fingas
    03.30.2016

    Now here's something you likely didn't expect at Microsoft's Build developer conference: A staple feature of Linux (and Unix) is coming to Windows 10. The company is integrating the Bash command-line shell and support for Ubuntu Linux binaries into Windows 10's Anniversary Update. This is, of course, big news for developers who want to use command-line tools while creating apps, but it's also important for power users who'd otherwise be tempted to install either third-party tools (like Cygwin) or a virtual machine.

  • 'Bash' command flaw leaves Linux, OS X and more open to attack

    by 
    Jon Fingas
    Jon Fingas
    09.24.2014

    Apparently, the internet has more deep-seated security bugs to worry about than Heartbleed. Researchers have discovered a longstanding flaw in a common Unix command shell (bash) for Linux and Macs that lets attackers run any code they want as soon as the shell starts running. They can effectively get control of any networked device that runs bash, even if there are limits on the commands remote users can try. That's a big problem when a large chunk of the internet relies on the shell for everyday tasks -- many web servers will call on it when they're running scripts, for example.

  • Betty helps you conquer the console by translating English to Unix commands

    by 
    Chris Velazco
    Chris Velazco
    05.12.2014

    If you've got a smartphone in your pocket, chances are you've got a digital assistant in there too (or you will very soon). For all her smarts, though, Siri can't help much when you hunker down in front of a UNIX shell, so former Google engineer Jeff Pickhardt set out to make the sort of digital assistant that could. "Her" name is Betty and (sadly) you can't verbally rattle off your Unix commands at her. No, she's all text-based, and more of an assistant than a transcriber anyway -- her raison d'etre is all about dutifully converting your typed whims from plain ol' English to the proper (and often arcane) command line syntax.

  • Use tmutil to take control of Time Machine in Mountain Lion

    by 
    Mike Schramm
    Mike Schramm
    11.07.2012

    Time Machine works best when you use it as it's designed: You simply let it run in the background and do its thing, only bothering it when you have to go back and get an old version of a document out. But if you ever want to do anything a little crazy with Time Machine ("adopting" a backup history on a migrated machine, for instance) it can be a little cranky. For those situations, says researcher Simon Heimlicher, there's a cool little Terminal command called "tmutil." The command, which was introduced in OS X 10.7 Lion, allows you to reconnect your computer to older backups if you swap hard drives or upgrade your Mac. While Lion and Mountain Lion will give you the option to inherit old backups when you migrate your machine, it's nice to be able to do it manually if you need to. It also allows for a few other functions, like combining and comparing backups, manually restoring items and adding or removing exclusions directly. Our buddy Cory Bohon points out a few more undocumented commands for checking your backup status. It should be noted that the improper use of "tmutil" could very easily munge your backups beyond salvaging, so be cautious. If you use Time Machine quite a bit, especially in those crazy ways it's not always meant to be used, it sounds like "tmutil" is well worth learning about.

  • Android 4.1 Jelly Bean proven carrying rough but working code for multi-user support (video)

    by 
    Jon Fingas
    Jon Fingas
    08.03.2012

    If there's ever been a persistent gripe among families sharing mobile devices, it's been the absence of multiple user profiles -- hand that iPad or Nexus 7 to Junior and you may have to play a spot-the-differences game when it comes back. Some long overdue testing of previously found code references in Jelly Bean shows that Google, at least, has explored ending that anxiety over who uses the family gadgets. Command-line code in AOSP-based versions of Android 4.1 will let you create a separate guest profile, complete with its own lock screen security, home screen layout and limited settings. To say that the code is unpolished would be an understatement, however. Apps and even some notifications cross over from the main account, which could prove more than a little embarrassing if the hardware is left in the wrong hands. At least it's easy to revert back, as the instructions (and video after the break) show. The real challenge will be waiting to see when -- or really, if -- Google gets to finishing multi-user code and turns that Nexus 7 into the communal tablet we want it to be.

  • Mac 101: Encode media from Automator or the command line in Lion

    by 
    Kelly Hodgkins
    Kelly Hodgkins
    11.22.2011

    There's an easy way in OS X 10.7 Lion to convert video or audio from one format to another, using a fixed suite of conversion settings. One approach uses Automator and can be launched from the Finder. The other uses the Terminal application and the afconvert (for audio) or avconvert (for video) command-line utilities. Behind the scenes, though, Automator is simply serving as a convenient front-end for the CLI tools. (You can also use the free Hoot app from the Mac App Store to do the same audio conversions.) The Automator method is the easiest to start with. Simply select the video or audio file you want to convert in the Finder. Under the Finder menu, choose the Services submenu, then "Encode Selected Video Files" or "Encode Selected Audio Files." You can also get to the Services submenu via the Finder's contextual menus; right-click the target file (or control-click, or on a trackpad, two-finger click) and the Services choices will be at the bottom of the pop-up menu. Finder menu / Services submenu Contextual pop-up menu Either approach will launch a dialog box where you can select your media conversion settings and the target file's destination. You can process one file at a time or, if you select multiple files, they'll be tackled in a batch conversion. The settings are slightly different for audio and video files, as appropriate to their media types -- you can experiment with the different settings to find the format that works for you. Video encoding settings Audio encoding settings For those of you more comfortable with the command line, you can use afconvert to encode an audio file from one format to another or avconvert to do the same with video. Type "afconvert -h" in Terminal to get a list of all the options you can use in the audio conversion. The avconvert tool is new in OS X Lion. Besides transcoding, it also lets you extract the audio or video track from a clip, change frame rates, add closed captioning and more. You read more about Automator video encoding and audio encoding at the Mac OS X Automation website. Additional information on the CLI commands can be found in Apple's Mac OS X Developer Library.

  • TUAW's Daily Mac App: DTerm

    by 
    Samuel Gibbs
    Samuel Gibbs
    08.02.2011

    The Terminal is a Mac power-user's best friend. When you need to get something specific done, access the underlying system, modify files or change some settings, command line is often the best and only way to get it done. Instead of having to go to it, DTerm brings the command line to you. Working in the command line normally means stepping out of your current workflow and stepping into Terminal. Although it can affect anything on the system, and helps you get the job done, it's a very separate process. DTerm, which we covered back in 2008, makes Terminal access context-sensitive. From anywhere in any program you can invoke DTerm using a user-configurable global hotkey, from there you can run commands on the files you're currently working with. No need to manually go through and navigate to the correct file directory, DTerm takes your command line session right there, already set to your current working directory. You can even insert the currently selected documents directly into the command line making it quick and easy. You can run your commands as you normally would, right from the floating DTerm window and even copy them straight out of the prompt. Once you're done you can just hit escape, use the hotkey combo again or simply ignore DTerm and it'll automatically fade out. DTerm brings the command line to you, integrating it more effectively and quickly into your work flow. It's a free download from the Mac App Store and is compatible with Lion. If you ever find yourself in Terminal as part of your workflow, give DTerm a whirl and see whether it speeds up your command line sessions.

  • Five Dropbox tips for Mac Unix nerds

    by 
    TJ Luoma
    TJ Luoma
    12.14.2010

    Dropbox is already a very powerful utility for Mac OS X, but if you're knowledgable in Unix, you can make it even better. Here are five ways that you can use Unix to get more out of Dropbox. 1. I wanted to update my copy of the HTML processing tool Tidy today. I was happy to find instructions for building Tidy under Snow Leopard, but it also reminded me of another way that I've been using Dropbox for some time now. If you compile and install Unix utilities on your own instead of using MacPorts, Fink or Rudix, you will most often be asked where you want to install these utilities to. Normally the answer is /usr/local/, and you would use ./configure –prefix=/usr/local. I became frustrated with installing programs to /usr/local/ because I use two or three different Macs, and I would inevitably find that I was trying to use a program on a computer where it wasn't installed. I'd have to find it, download it, configure it, compile it and install it before I could actually do whatever it was that I wanted to do.

  • Terminal Tips: Unfreeze your Mac

    by 
    TJ Luoma
    TJ Luoma
    07.12.2010

    Look, it's nothing to be ashamed of, it happens to everyone: your Mac has frozen up and won't respond. I know, I know, for years we Mac folks used to love poking fun at Windows because it freezes up. Apple even made a commercial about it. As someone who has used both, I will say that I have seen this far, far less frequently with Macs... but it happens. When apps freeze, it's generally pretty easy to deal with. Control-click (or "right" click for you crazy kids with your multi-button mice) the app icon in the dock, and if it says "Application Not Responding" it will offer a "Force Quit" option. Hopefully that will do it. But what if it doesn't? Read on for your options...

  • GoogleCL command line tool might be the nerdiest product Google has ever made

    by 
    Chris Ziegler
    Chris Ziegler
    06.18.2010

    Command-line utilities are archaic little things that products like X, Windows, OS/2, Macintosh, and countless other GUIs over the last few decades were designed to kill -- yet here we are in the year 2010, and they're still alive and well. In fact, many power users (read: nerds (read: us)) find a good terminal window to be an invaluable part of their daily productivity routine, but the last thing we ever expected was for Google to randomly pony up a set of terminal-friendly commands for its most popular services. Collectively known as GoogleCL, you can now type your way to a Picasa upload, a YouTube encode, or a Contacts search without any pesky eye candy getting in your way. You need Python installed for GoogleCL to work, but if you've made it this far into the article, we're pretty sure you've already got it installed... right?

  • Use networksetup to change AirPort networks from the command line

    by 
    TJ Luoma
    TJ Luoma
    05.06.2010

    The other night I needed to change Wi-Fi networks on a computer that I was connected to via ssh. Just about every page that I found via Google led me to try the exact same thing (type "airport -A") with one minor problem: it didn't work. Let's back up a little bit. You may know that there is a commandline tool called "airport" which is buried fairly deeply in the filesystem: System » Library » PrivateFrameworks » Apple80211.framework » Versions » Current » Resources » airport Not the usual place to find a commandline utility. Translation? "This is here for Apple to use, but it's not something you ought to rely on." But of course that's not going to stop us. Read on for more...

  • Rudix, a lightweight way to add new Unix utilities

    by 
    TJ Luoma
    TJ Luoma
    05.04.2010

    Rudix offers a collection of Unix utilities which do not come with OS X by default. When setting up a new Mac I always install these Unix utilities: wget, ncftp, lynx with SSL support, and the GNU Core Utilities. I compile them manually whenever possible, despite options like MacPorts or Fink. I don't need everything that MacPorts and Fink offer, and installing them always felt like overkill -9 (that's a commandline joke, kids). Generally they try to mimic the commandline syntax of either Linux or FreeBSD, neither of which I have used extensively. Although Rudix offers a giant 361MB DMG with all of the packages includes, I recommend only installing what you need. You can find each program with its own OS X .pkg installer. These pkgs install to the traditional location of /usr/local/ (something both MacPorts and Fink avoid, a side effect of the volume of software they are designed to install, as well as a difference in approach).

  • msmtp, a free tool to send email from Terminal

    by 
    TJ Luoma
    TJ Luoma
    05.04.2010

    I fully expected that my article on mailsend would lead to several "Why don't you use use XYZ instead?" replies, and it did. Suggestions included Ruby, Python, iPhone push notifications, and configuring postfix/sendmail. But one suggestion was to use msmtp, and that turned out to be the golden nugget. What makes msmtp so great, especially compared to mailsend, is that it completely eliminates the need to store your Gmail password in a plain text file on your computer. msmtp uses the Mac OS X Keychain instead. The other big advantage is that mailsend required several command line arguments every time, which makes it very likely that someone (i.e. "me") is going to screw it up. Once msmtp is configured, I can use the venerable "/usr/bin/Mail" to send email from the command line, and /usr/bin/Mail is nearly idiot proof. (Note I said "nearly" -- this is not a challenge!) In short: msmtp was what I was looking for when I found mailsend. Although configuring msmtp took about 30 minutes, it was well worth it, and now that you have these handy instructions, it should take you even less time than it took me. (You can also get mstmp from Rudix or MacPorts but I still like building my own whenever possible. You might not share my neuroses, however.) Read on for a complete walk-through.

  • Fix iPhone EXIF rotation from the command line

    by 
    TJ Luoma
    TJ Luoma
    02.17.2010

    My iPhone is the camera that i use more than any other, but there's one thing that has consistently annoyed me about it. Apple uses an EXIF tag to rotate images. This can be a problem when you share images with others. Safari will rotate the image correctly, but no other browser will. Adding to the trouble is that Mail.app and the Finder will also "auto-correct" the rotation, so it can be hard to tell which images need to be "fixed" and which don't. You could use the '/usr/bin/sips' program (sips --rotate 90 picture.jpg) if you knew which pictures need to be corrected, and which direction they need to be rotated (clockwise or counter-clockwise). But I wanted something that would, as they say, "just work." (I also wanted something I could use on my webserver, which runs Linux, but that's really a side issue.) My attempts to find a solution on Google were fruitless, so I asked on Twitter. Michael Baltaks pointed me to jhead, which describes itself as a "Exif Jpeg header manipulation tool" which includes the source code as well as pre-built binaries for OS X, Linux, FreeBSD, and even Windows. To fix a picture named "image.jpg" just type "jhead -autorot image.jpg" and you will see "Modified: image.jpg". You can fix all JPGs in the current folder using "jhead -autorot *.jpg" and it will only change the images which have the EXIF tag. Note: You might be tempted to use the "-norot" argument, which will "zero out" the rotation tag, but it will not have the desired effect, and (even worse) once you have used the "-norot" you can't use "-autorot" -- trust me, I learned that one the hard way.

  • Homebrew, the perfect gift for command line lovers

    by 
    Brett Terpstra
    Brett Terpstra
    12.25.2009

    If you're an OS X user who spends as much time on the command line as you do in the GUI, you're probably familiar with the MacPorts and Fink package management projects, making open source software easier to compile and run on Mac OS X. You may also be well-aware of the shortcomings of these projects when it comes to future-proof package management. A new, open source project called Homebrew may be exactly what you've been looking for. If you're not a lover of all things CLI, send a link to Homebrew as a great (free) last-minute gift for the Terminal-lover in your life. My favorite thing about Homebrew is its ability to function perfectly well with /usr/local as its base directory, installing packages in their own folders but linking them to /usr/local/command. This makes them manageable with existing command line tools. Homebrew can work out of any directory you like, if /usr/local isn't your cup of tea. Installed packages are optimized and stripped based on your architecture, and makes great use of libraries you already have installed or that came with the system, reducing duplication and speeding up download, compile and install times significantly. Add in the zero-config installation, an already-extensive list of "formulas" (packages), a greatly-reduced need to sudo anything, and a Ruby-based framework for creating your own formulae and you've got a killer package for extending your command line toolset. Homebrew is available for free on GitHub, and the main page has complete instructions for various types of installation (and reasons why you'd pick each one). Check it out, and have a merry CLI-mas!

  • Mac 10.6 comes with license to kill

    by 
    TJ Luoma
    TJ Luoma
    09.03.2009

    The name's Leopard... Snow Leopard... and how I wish it was 10.7 instead of 10.6 so I could extend these hokey James Bond allusions further. That said, it is closer than the truth than you may think. Apple has given Snow Leopard a license to kill... but this doesn't have anything to do with espionage or even spyware (pardon the pun). Instead, it has everything to do with Apple's desire to make the shutdown process faster. One of the systemwide refinements tells us that "Snow Leopard is up to 80 percent faster when shutting down." If you've ever waited impatiently for your Mac notebook to shut down while your flight was boarding or at the end of the day when you are anxious to get home, Apple is looking to reduce that frustration. Towards that end, Snow Leopard allows developers to mark their applications as "clean" or "dirty" -- not that kind of dirty! Here's an example of what "clean" vs "dirty" means in this context: imagine you have been working in Pages, but all of your documents are saved (or maybe you've closed all the documents but Pages is still running). Pages can mark itself "clean" which is similar to saying "I'm ready when you are!" Now imagine that you are working in Pages, and you've saved your file, but after you saved it you made some additional changes. Perhaps you have several documents open and unsaved, or you've got a Preferences dialog open. If you look at the 3 circles in the top-left corner of the window, you'll see that the one of the far left has a hole in the middle which goes away when you save the file. If any of those situations are true, Pages is considered "dirty," the programmatic equivalent of "Just a moment please!" When the user tells the operating system to shutdown (not just sleep), the operating system will look to see which applications are "ready to go" and applications are still looking for their metaphorical keys. The ones that are ready? They get killed, and killed hard. It's like the difference between telling an app to "Quit" versus "Force Quit." If you ask it to Quit, it is going to check to see if it needs to do anything before it does. If you tell it to Force Quit, it's just going to go away. If you are familiar with the Terminal, you may have used 'kill' to stop some process from running. Usually if you want to 'kill' an application nicely, you send 'kill -TERM' ("software termination signal") which says "OK, clean up your things and let's go!" However if you find that something refuses to stop, you might use 'kill -9' which is referred to as SIGKILL, described as "non-catchable" and "non-ignorable." This is like picking up your child and carrying him or her away because it is time to go now with no questions asked. Applications which mark themselves as "clean" are telling the operating system: "You can use 'kill -9'/Force Quit on me without worrying about losing anything." How much longer does "Quit" take compared to "Force Quit"? Maybe only a second or two, maybe a fraction of a second. But if you have a lot of applications running and the majority of them can skip that time, it helps the overall speed of the shutdown. Think of it like this: imagine you had a bunch of family members over and you were trying to get everyone out of the house to go to a restaurant: young kids, a couple of older aunts and uncles, and maybe grampa. You've probably asked something like this: "Does everyone have everything they need? Kids, did you go to the bathroom? Uncle Joe, did you get your coat and hat? Grampa, do you have your sweater in case it's too cold?" Even if everyone says "yes" it took longer than if you said "Let's go" and everyone replied "We're all ready!" Is this a "sexy" feature of our newest cat-themed operating system? Not at all, but it is one of those "little details" that makes life a little easier as a Mac user: a little faster, a little more attention to detail, and exactly the sort of thing Apple promised to pay attention to with Snow Leopard. (Big tip o' the hat to John Siracusa's epic Snow Leopard review at Ars Technica for bringing my attention to this feature. I look forward to John's operating system reviews almost as much as I look forward to the operating systems themselves.) photo via flickr creative commons: danzen

  • 3.0 firmware release expected at 10am PT/1pm ET, quick Terminal tip to check

    by 
    Erica Sadun
    Erica Sadun
    06.17.2009

    Hey, iPhone 3G owners: Please do not download the 2,1 firmware files listed below. They are for the 3G S and will not work on your phone. Read the whole post for details. The correct firmware for the 3G will start with "iPhone1,2" instead. If you were up all night waiting for the new iPhone OS to arrive, you're in good company -- we were too, until we began getting Twitter reports from users in Hong Kong and Sweden that the local carriers sent out SMS alerts to their customers suggesting when they could download 3.0. Those times both align with a 10 am PT/1 pm ET go time, and that's when we're calling it for now; Engadget concurs. That's why you're still seeing 2.2.1 as the most current version in iTunes; the new version hasn't been released yet. Those with a command-line bent and an inability to wait without doing something can launch Terminal and type in the following every few minutes to see whether 3.0 has launched, rather than repeatedly clicking the Check for Upgrade button in iTunes (note that the up-arrow in Terminal reloads the previous command): curl -s -L http://phobos.apple.com/version |\ grep -i restore |\ grep '_3.' | open -f The results will look something like URLs ending with this: iPhone2,1_3.0_7A341_Restore.ipswiPhone2,1_3.0_7A341_Restore.ipsw The model number indicates which unit has downloadable firmware. As of right now, only the iPhone 3G S firmware has been updated. That's the 2,1 iPhone model. Yes, the 1,2 iPhone 3G model was considered a revision of the first generation 1,1 iPhone as it only had moderate hardware changes. The two iPods are 1,1 and 2,1 for the first and second generation. (No, for those wondering in the comments, you cannot download the 2,1 firmware and install it on your iPhone or iPhone 3G -- it will only work with the 3G S.) To download, copy the URL and paste it into Safari's download window or use any other favorite method to retrieve the firmware. Then hold the Option key and click Update in iTunes. Navigate to the firmware (the ipsw file), select it, and 3.0's good to go. Of course, you can also download directly through iTunes as soon as the update is available.

  • LiveChat: Pwnage and Beyond

    by 
    Erica Sadun
    Erica Sadun
    07.21.2008

    This weekend, the iPhone Dev Team delivered an iPhone 2.0 jailbreak. Today, TUAW invites you to chat about the jailbreak, about the new Cydia installer, and about the future of iPhone jailbreak development and use. Follow the jump to join in our discussion.