Just pass the URL to curl and tell it where to deliver the load via the -output option, as demonstrated below. curl: Download a URL from the command line (copy URL)Ī powerhouse of a command-line utility, curl lets you do many things, but the most handy capability is retrieving a file from a website. $ caffeinate -s scp bigfile me:myserver/bigfile 3. To prevent your Mac from sleeping until the secure file copy (scp) completes: To prevent your Mac from sleeping for one hour (3,600 seconds): You can explicitly specify an elapsed period of wakefullness, in seconds, with the -u and -t options, or you can use caffeinate to invoke a command-line utility that you want to not be interrupted by sleep. What do you do? Give it some caffeine! That's what caffeinate does. Let's say you started a long-running file transfer just before lunch and don't want your system to go to sleep. This command is new in OS X Mountan Lion. caffeinate: Prevent a system from sleeping $ sudo ln -s /System/Library/PrivateFrameworks/amework/Versions/Current/Resources/airport /usr/sbin/airport To create a symbolic link to the airport command: (Hint: If you don't get any output, turn Wi-Fi on in the Network system preference.) Then just type airport -s in the Terminal's command line to get the detailed scan report. But you can create a symbolic link to it using the one-time command below. It shows you the numeric signal strength for every access point, the channel used, and the encryption level, if any.Īlas, the airport command-line utility is buried deep in the System directory (aka System folder when using OS X's GUI). The airport command-line utility does the same and a lot more. When you click the Wi-Fi icon in OS X's menu bar (called AirPort before OS X Lion), you get a list of available wireless networks. airport: Scan your local wireless environment from the command line For example, man lsof displays the manual page for the List Open Files command.ġ. For most of these commands, you can get more documentation using the "manpage" system: Type man followed by the command name. All commands, unless otherwise noted, run on all versions of OS X since 10.4 Tiger. What follows is an alphabetical list of the 20 best command-line gems, with enough description to put you on the path to using their productivity riches. Some you may already know, but others are sure to make you sit up and exclaim, "Sweet!" I've scoured the Internet for the best of the best of these utilities. There's already a huge brain trust of tool knowledge around using Bash as a systems administrator's command shell.īut OS X brings its unique capabilities to the command-line table, in the form of utilities that leverage OS X's user interface, file system, and security capabilities. It's widely used on operating systems of all kinds, including iOS, Linux, Unix, and mainframes. Bash - for "Bourne again shell" - was developed by free-software guru Brian Fox. The command shell itself, delivered by Apple's included lTerminal program, is a wonder of open source. But system administrators and power users know that the Mac's command-line interface can be a powerful time saver and, in many cases, the only method to accomplish certain tasks. For most people, the Mac's OS X is all about the graphical user interface.
0 Comments
Leave a Reply. |