Friday, October 2, 2015

Review: OS X 10.11 El Capitan

TechRadar: All latest feeds Review: OS X 10.11 El Capitan

Review: OS X 10.11 El Capitan

Introduction

Following a period of public beta testing, Apple's latest desktop OS refresh has arrived in its official capacity in the form of OS X El Capitan. While the changes in El Capitan are a far cry from the sweeping visual refresh that came in-step with 2014's Yosemite update, that doesn't mean Apple has skimped out on providing a solid delivery.

It's much better to think of El Capitan as an OS X update that adds some spit and polish to Yosemite while also providing some convenient tweaks and features. And despite some minor pain points, Apple has succeeded in that respect.

If you're wondering whether you should make the leap from Yosemite to El Capitan, the answer is ostensibly yes. That being said, let's take a deeper look at Apple's latest, including its highs and lows, to see why you should consider the upgrade.

El Capitan

Interface

Upon first booting your Mac back up after installing OS X El Capitan, you're not going to notice many visually apparent changes. El Capitan largely carries over the same flat, iOS 7-inspired design cues that arrived with Yosemite, and, frankly, that's a good thing.

You are likely to see to changes if you're astute and do a little poking around. The first, and most aesthetically pleasing change is the adoption of a new system font. Yes, after initially switching to Helvetica Neue in Yosemite, Apple has once again switched things up with its own, specially designed font called San Francisco that also appears in iOS 9 and on the Apple Watch. Overall, this is a welcome change that only further unifies the Apple ecosystem.

The second main interface element change you're likely to notice also happens to be one of convenience. Now, if you're struggling to find your mouse cursor, simply wiggling the mouse back and forth will cause the cursor to temporarily inflate in size. It's an extremely minor detail, but it's a nice change that keeps with Apple's focus on the little things in El Capitan.

Split View and Mission Control

General interface sameness notwithstanding, Apple has managed to bring some pretty major changes to multitasking in El Capitan. On the minor side of things, the new Mission Control features few tweaks that clean things up a bit.

El Capitan

Now, when you swipe up with three fingers on your trackpad, you'll notice that Mission Control's overall view of your open windows is more spread out. The multitasking feature no longer overlaps windows, which could make it a bit easier to spot the window you want at a glance.

Meanwhile, the Space Bar at the top of Mission Control now features labels, rather than thumbnails by default. Thumbnails aren't totally gone, however, as hovering over the labels will give you a peek at the thumbnails. And as an added bonus, you can now drag windows up to the Space Bar to create new desktops.

None of the Mission Control changes are what I'd consider essential, but they aren't off-putting either. Where multitasking has really taken off, however, is with the new Split View.

Anyone who has used a Windows PC in the last half-decade will be familiar with Split View. The feature essentially lets you more easily manage side-by-side windows on your desktop with a couple of clicks, rather than going through the cumbersome process of manually resizing each window.

There are a couple of different methods for accessing Split View. The first involves clicking and holding on the green full-screen icon in the upper-left corner of a window. One side of your screen will then turn blue and you can then drop the windows on that side. After that's done, OS X will show you other open Split View-compatible apps that you can then drop on the other half of the screen.

El Capitan

The second method involves the Space Bar in Mission Control. If you have an app already expanded to full screen, you can swipe with three fingers to open Mission Control. From there, you can drag a compatible app up to that desktop in Space Bar to add it in Split View.

Overall, Split View is a fantastic step forward for multitasking on OS X. However, already being familiar with Microsoft's implementation of Snap in Windows, I do have one misgiving about Apple's methods. Just getting apps into Split View feels like it takes too many clicks, and I would have liked to see Apple move more towards a "drag-and-snap" method. That being said, it's still a great feeling to know I don't have to manually fiddle with a window's size and position to work on two things at once.

Spotlight

Another area receiving some big love in El Capitan is the improved Spotlight Search. We saw Spotlight get a touch-up in Yosemite, but El Capitan works to bring it in-line with its counterpart on iOS.

Spotlight in El Capitan can now pull from more sources for data, bringing you weather, stock, and sports information directly to the Spotlight Search box with a click on the menu bar.

Perhaps the largest change to Spotlight, however, is the addition of natural language recognition. Essentially, this means you can ping Spotlight with complex queries like "emails from Bill in June" or "documents I edited last week." This also extends to Spotlight's new web sources, allowing you to enter phrases like "what's the weather in Cupertino."

El Capitan

There's no doubt that the Spotlight Search's new smarts are a vast improvement over its previous iterations, but I found the natural language input to be a bit finicky with how I worded things at times. Additionally, while Apple has brought Spotlight a little bit closer to its iOS counterpart in El Capitan, I can't help but feel it's high time to go all-in and bring Siri to the desktop. After all, what's more natural than simply asking a question with your voice?

Notes

The diminutive Notes app has perhaps seen some of the biggest changes of any stock app in El Capitan. Whereas Notes was previously a pretty barebones affair, it is now expanded with the ability to add new types of content, more ways to format your notes, and more.

Users now have the option to add videos, PDFs, and Maps locations to notes, making it that much easier to flesh out your ideas. In tandem, Apple has expanded Notes to be an option in the Share Sheet across many of its own apps – something developers also have access to – so pulling that content in is a smooth as a couple of clicks.

El Capitan

To keep track of these elements, the Notes app now includes an attachments browser, which provides a running list of media elements you've attached over time. Combine that with the ability to finally add proper checklists (as in, you can actually check items off), as well as the addition of a third "categories" pane, and it's hard to complain about this update. Some users will still flock to third-party solutions like Evernote and Wunderlist for their needs, but the stock Notes app is now much more viable.

Safari, Mail and Maps

Though its changes are minor (on par with the rest of the OS), Safari has caught up with the competition in some respects as well. First and foremost is the addition of site pinning, which can really help out if you find yourself frequenting the same group of sites on a daily basis.

To use site pins, you control-click the tab for a particular site and click the "Pin Tab" menu option. From then on, no matter what else you do in your browser, that site will be loaded up and ready to go in a miniature tab on left of the tabs bar. For those of us that rely on constantly checking specific pages, whether it be Gmail or Facebook, for our workflow, pinned tabs add a bit of convenience.

More minor, but no less useful, is that tracking down a rogue sound clip or video that starts playing in one of potentially dozens of open tabs is now much easier. Similar to Chrome's implementation, Safari now displays a tiny speaker icon on any tab that is playing sound. To put an end to the noise, you simply click the icon and the tab is now muted. Finally, Safari now sports compatibility with Apple's AirPlay. With this, you can now cast videos to your Apple TV while getting a bit of work done on your Mac.

El Capitan

Combined with Safari's already great speed on OS X, these are all solid improvements that could make the browser worth another look for those that are tired of Chrome's constant assault on both battery and memory. However, if you're tied to Chrome's larger extension library, you may not be sold.

Mail

Mail has also picked up some nice enhancements, but it's still far from the type of redesign that would make customers rush back to the oft-maligned email client.

Perhaps the most prominent change in Mail is that it now supports gestures not dissimilar to those that appear in its iOS cousin. You can now use a two-fingered left swipe to delete an email, while a right swipe will open up options to mark an email as read. I was already used to this behavior with my go-to third-party client, Mailbox, so the transition was easy and welcomed.

Mail also now features tabs for your drafts while in full-screen mode, which makes working through multiple threads at once less of a chore. Also appearing in the revamped Mail are some new smarts that will automatically detect times and dates, giving you a quick-access link to your calendar in response. The same applies for phone numbers and addresses, with Mail prompting you to easily add such information to your contacts. It's the type of thing that initially evokes an approving shrug of the shoulders, but becomes invaluable the first time you use it to add a meeting or due date to your calendar.

Maps

El Capitan

You're allowed to sing your praises from the rooftops on this one: transit maps are finally here. Okay, so it's a much bigger deal on iOS 9, since that's on the device in your pocket at all times, but it's no less intriguing a prospect on a Mac.

True, the transit directions are only available for a handful of cities in the U.S. and Europe at the moment, along with hundreds in China, but more will be added as time goes on. The feature works as you'd expect, allowing you to enter start and end points, then showing you which subway or bus line to take and where to switch. Even better is that Handoff allows you to easily plot your course on your Mac and then send it off to your iPhone before you head out the door.

Verdict

OS X El Capitan doesn't represent a sweeping departure from the foundation set by Yosemite by any means, but, overall, that feels okay for an update following on the heels of the overhaul we saw in 2014. There are certainly some areas where I would have liked to see Apple push further, but El Capitan feels like a solid spit-and-polish type of update.

El Capitan

We liked

Despite its somewhat clunky implementation, Split View is a welcome, sorely needed addition. The ability to easily get a couple of apps side-by-side for an intense multitasking session means there is no need to fiddle with manually resizing and placing windows in just the right spot. Similarly, Spotlight Search is now handier than ever, and I'm looking forward to seeing how Apple improves on not only the natural language detection, but the sources Spotlight draws from as well.

And while none of the app changes may seem striking or revolutionary, they add up to form a nice package that brings Apple's offerings closer in-line with third-party options. The sheer quality-of-life improvements brought to Safari in the form of pinned tabs and tab muting are particularly noteworthy. Add in a revamped Notes app that has me questioning my loyalty to Evernote, and the updates feel solid all around.

Finally, there's performance to consider. Apple has clearly done a bit of work under-the-hood to speed up OS X, and it's noticeable from the get-go. Apps load and switch more quickly, and there's a definite feeling of freshness when you load El Capitan for the first time. Perhaps best of all, El Capitan still retains compatibility with a massive list of Macs going back to 2007, so nearly everyone can get in on the action.

We disliked

Despite its utility, Split View feels cumbersome compared to Microsoft's implementation in Windows. Anyone that has used Snap on Windows 7, 8 or 10 is likely familiar with the simple click-and-drag gesture used to invoke it, and Apple would have done well to take a cue from Microsoft in this department. The time spent waiting after you initially click on the full screen icon feels wasted, and the process overall simply doesn't feel as modern as it could be.

Ultimately, I would have liked to see Apple go further with its apps as well. Outside of the refreshed Notes app, the other changes feel like a game of catch-up. Safari will certainly see more use thanks to its added features, and its memory and battery consumption are second-to-none on the Mac, but I'm still not convinced it's enough to cause users to switch from alternatives. Similarly, I don't see Mail's changes as being enough to cause those tied to their Gmail tab to give it a second thought.

Final verdict

OS X El Capitan isn't going to please anyone looking for a revolution, but it's a solid update overall. Between the performance improvements, new app features, and multitasking tweaks, there's no reason not to dislike what Apple has accomplished here. And the lack of major design changes is good news for those who may have been a bit shellshocked by Yosemite's redesign in 2014.

In musical parlance, the upbeat is less pronounced than the downbeat, but it's no less important, and the same thing can be said when comparing El Capitan to Yosemite. In short, if you're still considering whether it's worth the free upgrade to El Capitan, the answer is a resounding yes.













http://rss.feedsportal.com/c/669/f/9809/s/4a5af9be/sc/28/l/0L0Stechradar0N0Cus0Creviews0Cpc0Emac0Csoftware0Coperating0Esystems0Cos0Ex0E10A0E110Eel0Ecapitan0E130A590A40Creview0Dsrc0Frss0Gattr0Fall/story01.htm

Sent with Reeder



Aron

Brief message sent from a handheld device.

Mac Tips: OS X El Capitan: how to pin sites in Safari

TechRadar: All latest feeds Mac Tips: OS X El Capitan: how to pin sites in Safari

Mac Tips: OS X El Capitan: how to pin sites in Safari

Sometimes bookmarks aren't enough. If your Safari window looks like mine, it's cluttered with tabs because you're scared of forgetting to go back to certain pages, or because you view a page so frequently, clicking a bookmark isn't fast enough. But Safari in OS X El Capitan offers a better solution: Pinned Sites. A pinned site appears as a tiny square icon to the left of your tabs and never goes away, keeping the site open and up to date. Pinning is easy, but Safari doesn't tell you how to do it — that's where we come in!

To pin a site, simply drag its tab to the far left side of the tab bar and drop it there. And you're done! Now you can easily click on a Google doc, Wikipedia page, or anything else you need regular access to without crowding the tab bar with so many sites you can't read their full names. If you decide to unpin a site, just drag its icon back to the right of the tab bar to turn it into a regular tabbed page, then click the "x" to delete it as usual.

How to pin sites in Safari













http://rss.feedsportal.com/c/669/f/9809/s/4a5d0737/sc/28/l/0L0Stechradar0N0Cus0Chow0Eto0Ccomputing0Capple0Cos0Ex0Eel0Ecapitan0Ehow0Eto0Epin0Esites0Ein0Esafari0E130A59340Dsrc0Frss0Gattr0Fall/story01.htm

Sent with Reeder



Aron

Brief message sent from a handheld device.

Car Tech Week: A history of the car head unit

TechRadar: All latest feeds Car Tech Week: A history of the car head unit

Car Tech Week: A history of the car head unit

A history of the car head unit

The car head unit is quickly growing synonymous with a touchscreen powered by either Android Auto or Apple CarPlay. However, it's important to remember that in-car entertainment wasn't always this convenient and colorful.

In fact, some of you might remember a device that went by the name of the CD player. Or, if you're particularly mature, you might even remember the humble cassette player. After some research, I found that, apparently, there were even different types of head units before the tape player.

Here is a history of the car head unit that shows exactly how far our in-car technology has come.

Car head unit

1930s: the mono AM radio

While auto enthusiasts had been trying to fit AM radios into cars for around a decade up to this point, it wasn't until the 1930s that the technology was introduced on a consumer level. Motorola, then called Galvin Manufacturing Corporation, offered the radio itself, and it retailed for around $130 (about £86, AU$184).

Sounds about right, you say? Well, this was the '30s, and $130 (about £86, AU$184), adjusted for inflation, was today's equivalent of around $1,800 (about £1,186, AU$2,554). A whole car could be purchased for three times the price of just the head unit at the time.

The technology was made possible due to the fact that Galvin Manufacturing purchased a battery eliminator business. This led to the creation of a battery eliminator for vacuum tube radios, allowing the radios to run on a standard home electric current.

In fact, the name Motorola was created when the company started making car radios. The name was derived from "motor" and "victrola," which was another name for a phonograph.

The AM radio remained the standard music player in the car for around two decades.

Car head unit

1952: the FM radio makes its debut

By this point, AM radio units for cars became significantly cheaper since they were released, but they weren't yet capable of receiving FM transmissions. Of course, FM radio wasn't yet that popular, which might be a little hard to imagine.

However, some companies could tell that it would soon become another standard. Germany-based Blaupunkt was the first company to offer an AM/FM radio, which was first made available in 1952. But bear in mind this was quite a while before FM radio caught on as a popular medium.

In the '50s, companies also experimented with in-car record players. Due to their size and the fact that bumps would cause skips in the audio, companies soon realized that in-car record players weren't viable.

Car head unit

1960s: the car stereo and in-car 8-track are introduced

Modern music is in stereo (technically known as stereophonic), meaning that there are two streams of audio, one for the left, and the other for the right. This allows musicians and music producers to create a "field" of audio, with, perhaps, a particular guitar found on the left channel and a set of backup vocals on the right.

Until the 1960s, however, audio was in monophonic (popularly known as "mono"), meaning it was one stream of audio, and left or right channels didn't matter. Experimentation with stereo music was made famous with bands like The Beatles and albums like Jimi Hendrix's "Axis: Bold As Love."

The first "stereo" systems in cars placed one stream of audio in the front and the other in the back, though left and right systems soon developed. The first car stereo was made by another German company, Becker, and was called the Europa, released in 1969.

The 8-track also made an appearance in the car, and was popularized because of its use in said cars. Ford pushed 8-track systems particularly hard, and other car manufacturers caught on in an attempt to compete before they quickly grew obsolete.

car head unit

1970s: the cassette tape emerges

Car manufacturers might have wanted to compete with 8-track systems, but the 8-track was soon replaced with a newer technology: the cassette tape.

The first tape deck units were actually pretty hard on the tapes themselves. A Japan-based company called Maxell even based an ad campaign on saying that its tapes could stand the abuse delivered by driving with tapes in the tape player.

The rise of the cassette tape was actually largely owed to its use in the car. This is because people enjoyed how compact the tapes were, meaning multiple could fit in the glove compartment to be listened to at any time, assuming that they didn't get stuck in the tape deck.

Today, many cars still use cassette tape-based systems. There are even "tapes" available that have a 3.5mm jack cable, which extends out of the tape deck and can be plugged into a device, such as a smartphone.

car head unit

1990s: CDs take over

Now we're getting into territory that some of us might actually remember. While CD technology was first introduced in the '80s and some car manufacturers tried to introduce it in their cars, the technology didn't really take off until the late '90s, as far as car head units go.

This was especially amplified by CD players that were able to read CD-RW discs, as well as those that could read MP3 files. DVD functionality even appeared late in the decade in some high-end cars, further pushing the idea that disc technology was superior.

car head unit

2000s: Bluetooth head units and infotainment systems appear

At the start of the new millennium, technology companies began making use of Bluetooth as a way to transfer and stream files, and in-car was no exception. Bluetooth technology itself was first being worked on in 1994, however it didn't really take off until after the turn of the century. When it came to cars, the wireless signal tech was implemented for hands-free calling, and companies even developed a system in which a head unit would mute itself during a phone call.

Perhaps more important than Bluetooth, however, was the introduction of the in-car infotainment system, a touchscreen that had GPS capabilities. Some of these systems even offered storage space for users to store their files. Unfortunately, many of these systems were clunky and unreliable as far as touchscreen technology went, and they also performed slowly.

There were, of course, exceptions. Ford Sync was first introduced by Ford in 2007, and enabled users to make hands-free calls and control music simply through voice control. In many ways, this was a precursor to voice controlled systems like Android Auto. And, while the voice control wasn't as well developed as what Apple and Android introduced years later, it was certainly a nice touch, allowing drivers to largely focus on the road.

Since the mid-2000s, car manufacturers have also started allowing users to control their infotainment system through controls on the steering wheel. Most commonly, these controls are for volume control, track skipping on CDs or changing the radio station.

car head unit

2010s: the future of the head unit

Since 2010, the head unit has improved in leaps and bounds, with both Apple and Google releasing their own in-car infotainment systems, CarPlay and Android Auto. These systems connect to your smartphone to play music, offer map navigation, and even use apps.

With an internet connection, whether it be through the smartphone or otherwise, cars not only offer entertainment and navigation, but they can also update the software in the actual car. Such is the case with newcomer automakers like Tesla, which has been able to even extend the range of its cars through simple software updates.

Car manufacturers won't stop there, however. As self-driving cars continue to develop, it is likely that the infotainment system will become the hub of the car, with you using it to tell your car where to take you. Voice control will also be implemented here, and drivers will continue to speak to their cars for tasks like music playback.

We envision a future in which a "driver" can lie down and take a nap as their car taxis them to their destination. Waking from the slumber, the driver can ask the car exactly how long it will be to the destination. After being told that it will only be a few more hours, they can tell the car to play their "sleepy time" playlist to help them fall back asleep. A bright future indeed.













http://rss.feedsportal.com/c/669/f/9809/s/4a5d074a/sc/24/l/0L0Stechradar0N0Cus0Cnews0Ccar0Etech0Ca0Ehistory0Eof0Ethe0Ecar0Ehead0Eunit0E130A59310Dsrc0Frss0Gattr0Fall/story01.htm

Sent with Reeder



Aron

Brief message sent from a handheld device.

Thursday, October 1, 2015

How to enter Windows 10's Safe Mode

Geek Tech How to enter Windows 10's Safe Mode

Aaron Kalmin asked how to boot into Safe Mode in Windows 10.

Windows' Safe Mode provides a simple, stripped-down version of the operating system. The programs that usually load automatically when you boot Windows don't do that here. And Safe Mode only uses the most generic drivers. Thus, Safe Mode can be a big help for diagnosing certain problems. For instance, it's a great place to scan for malware.

But the old-fashioned way to get into Safe Mode—booting the PC and pressing F8 at the exact right moment—seldom works on PCs running Windows 10. These techniques will:

[Have a tech question? Ask PCWorld Contributing Editor Lincoln Spector. Send your query to answer@pcworld.com.]

To read this article in full or to leave a comment, please click here




http://www.pcworld.com/article/2984712/windows/how-to-enter-windows-10s-safe-mode.html#tk.rss_all

Sent with Reeder



Aron

Brief message sent from a handheld device.

Six Linux terminal time-savers

TechRadar: All latest feeds Six Linux terminal time-savers

Six Linux terminal time-savers

Aliases

aliases

Using the terminal in Linux can be faster and more productive than using a GUI, especially with repeated operations. To get the most out of this, it helps to know a few of the shell's secrets.

Do you often find yourself typing in the same command options over and over again? Do you sometimes have trouble remembering the correct options? Are you just plain lazy and want to avoid typing wherever possible? If you answered yes to any of these, then aliases are for you.

You already have some shell aliases set up. To list them, type:

alias

which will return entries like this (from Ubuntu):

alias ll='ls -alF'
alias ls='ls --color=auto'

The first of these examples is simple – if you type in ll, it runs ls -A. The second is cleverer, as the alias is the same as the command name, so the old ls behaviour disappears and it's always run with the --color=auto option.

If you find yourself always using certain options with particular commands, aliases like this effectively make those options the defaults.

The alias is expanded before the rest of the command line is interpreted, so:

ll X Y Z

becomes

ls -alF X Y Z

These aliases aren't always easy to remember, but fear not – you can create your own aliases using exactly the same syntax as in the output from the alias command:

alias myalias='somecommand --option1 --option2'

Aliasing a command to its own name is a neat trick, but what if you then need to use the original command? Don't worry – the developers have thought of that. Prefix the command with a backslash and your alias will be ignored:

\ls Documents

Profiles

Linux terminal

You can customise your terminal experience with aliases and custom prompts, but to make them even more convenient you need a way of applying these automatically when you open a terminal.

That can be done through your profile, which is a file containing commands that are read and run whenever you open a shell session.

There are several locations that are read, the first of which is /etc/profile, which contains global profile settings. This in turn runs any files in /etc/profile.d, which makes it easy to add global settings without touching the default profile.

Then the user's profile is read from one of /.bash_profile, /.bash_login and /.profile. Only the first of these files that exists is run, and any settings in here override those in the global profile if the same thing is set in both.

The profile is simply a set of shell commands, one per line, that are run when the shell starts up. These can set up aliases, environment variables or set the command prompt. A typical use of environment variables would be to change the default text editor to nano:

EDITOR=/usr/bin/nano

Word completion

tab completion

If you aren't a particularly confident touch typist, you'll soon get fed up with typing out command and file names in full, then dealing with the error messages resulting from misspellings. Fortunately the shell provides a way to both save typing and avoid mistakes called tab completion.

The name is fairly self-explanatory – it uses the Tab key to complete the word you are typing. If this is the first word on a line, it will be a command, so it looks in the command path for matches, for example typing chm and hitting Tab will complete to chmod.

Used after the command, the Tab completes on file names, so instead of typing:

cat /pathto/somelongdirectory/someevenlongerfilename.txt

you can use:

cat /pa[press TAB]som[press TAB]som[press TAB]

Isn't that easier? When more than one file matches, the Tab key will complete up to the point where it becomes ambiguous; pressing Tab again at this point shows a list of options, which you can cycle through with Tab, or add another letter or two and press Tab again. It is actually a lot easier to use than describe – just try it.

Wildcards

Linux terminal

There are times you want to include more than one file in a command but don't want to type them all out. The Linux shell has a couple of 'wildcard' operators to help with this. The most used one is the star, which is used as a replacement for any string of characters.

So * on its own will match every file in the current directory (that this is different from MS-DOS shells where * does not match . and you need to use *.* to match any file with an extension).

You can also use * to match one part of a file name: *.txt matches all files that end with .txt, and a*.txt matches only those that also start with a.

This matching is performed by the shell. It expands the matches to a list of files before passing them to the command, which never sees the wildcard or even knows that you used one.

This can be an important distinction, especially if you want to pass a * to the program you're running. For example, say you're using scp to copy files from a remote computer and run the following:

scp user@othercomputer:Documents/*.txt Documents/

You may expect this to copy all .txt files from the other computer's Documents directory to the same one here, but it won't. The shell expands the *.txt to match all .txt files on the local system, so you copy only the files you already have.

In such an instance, you need to tell the shell not to expand the * by preceding it by a backslash, known as escaping it:

scp user@othercomputer:Documents/\*.txt Documents/

Now it passes Documents/*.txt unchanged to the remote computer and lets its shell handle the expansion.

There's a second wildcard character, too. While * matches any number of characters, including none, ? matches exactly one. So ab?.txt matches abc.txt and ab1.txt but not ab.txt or abcd.txt, whereas ab*.txt would match all of them.

Command substitution

Linux terminal

There is a powerful feature in shells called command substitution. This allows you to embed the output from one command in another.

As a simple example, let's say there is a command called foo on your system and let's say you want to know what type of program it is: compiled, Python or even a shell script. The which command gives you the path to a program, and file reports the type of a file. You could use:

which foo

to get /usr/local/bin/foo and then

file /usr/local/bin/foo

to get the file type, but even with copy and paste, this is a lot of work and easy to mistype. Alternatively, you could do:

file $(which foo)
/usr/local/bin/foo: a /usr/bin/perl script, ASCII text executable

What happens is that the shell runs whatever is inside $(..) and substitutes the output from that into the command line before running it. You can also use backticks for this:

file 'which foo'

This is quicker to type but less readable, especially when posted to a forum where the reader's font can make ' and ' look similar. With the first format there is no such confusion.

Terminal time-savers: repeat

history

One of the great advantages of the shell is that it's simple to repeat commands, no matter how complex, with a couple of keypresses. At its simplest, you can press the Up key to show previous commands, then press Enter to run your chosen one again.

You can also edit the command before running it, if you like. That's fine if you want to use one of the last few commands you ran, but most shells keep a history of the last 500 or so commands that you can access again.

To avoid wearing out your keyboard's Up arrow key (and your eyes), press Ctrl-R and then type in part of the command. The terminal will show you the most recent command that matches what you are typing, updating with each keypress.

If you have run several very similar commands, you don't need to keep typing – just type a few characters and press Ctrl-R again to see the previous match. Keep going until you find the one you want. (Don't be alarmed – this is one of those things that takes far longer to describe than to actually do.)

You can edit the command before running it. The search term that you type in doesn't have to be the command itself – any part of the command line will match, so you could start with the file name.

You can also access commands within the history directly. The ! character tells the shell that you are referring to its history. !! is a shortcut for the previous command while !-n means 'execute the command run n commands ago' (so !! is the same as !-1). !xyz runs the last command starting with xyz, and !?xyz does the same for the last command containing xyz (much the same as Ctrl-R does).













http://rss.feedsportal.com/c/669/f/9809/s/4a53327e/sc/15/l/0L0Stechradar0N0Cus0Chow0Eto0Ccomputing0Csix0Elinux0Eterminal0Etime0Esavers0E130A54860Dsrc0Frss0Gattr0Fall/story01.htm

Sent with Reeder



Aron

Brief message sent from a handheld device.

Six Linux terminal time-savers

TechRadar: All latest feeds Six Linux terminal time-savers

Six Linux terminal time-savers

Aliases

aliases

Using the terminal in Linux can be faster and more productive than using a GUI, especially with repeated operations. To get the most out of this, it helps to know a few of the shell's secrets.

Do you often find yourself typing in the same command options over and over again? Do you sometimes have trouble remembering the correct options? Are you just plain lazy and want to avoid typing wherever possible? If you answered yes to any of these, then aliases are for you.

You already have some shell aliases set up. To list them, type:

alias

which will return entries like this (from Ubuntu):

alias ll='ls -alF'
alias ls='ls --color=auto'

The first of these examples is simple – if you type in ll, it runs ls -A. The second is cleverer, as the alias is the same as the command name, so the old ls behaviour disappears and it's always run with the --color=auto option.

If you find yourself always using certain options with particular commands, aliases like this effectively make those options the defaults.

The alias is expanded before the rest of the command line is interpreted, so:

ll X Y Z

becomes

ls -alF X Y Z

These aliases aren't always easy to remember, but fear not – you can create your own aliases using exactly the same syntax as in the output from the alias command:

alias myalias='somecommand --option1 --option2'

Aliasing a command to its own name is a neat trick, but what if you then need to use the original command? Don't worry – the developers have thought of that. Prefix the command with a backslash and your alias will be ignored:

\ls Documents

Profiles

Linux terminal

You can customise your terminal experience with aliases and custom prompts, but to make them even more convenient you need a way of applying these automatically when you open a terminal.

That can be done through your profile, which is a file containing commands that are read and run whenever you open a shell session.

There are several locations that are read, the first of which is /etc/profile, which contains global profile settings. This in turn runs any files in /etc/profile.d, which makes it easy to add global settings without touching the default profile.

Then the user's profile is read from one of /.bash_profile, /.bash_login and /.profile. Only the first of these files that exists is run, and any settings in here override those in the global profile if the same thing is set in both.

The profile is simply a set of shell commands, one per line, that are run when the shell starts up. These can set up aliases, environment variables or set the command prompt. A typical use of environment variables would be to change the default text editor to nano:

EDITOR=/usr/bin/nano

Word completion

tab completion

If you aren't a particularly confident touch typist, you'll soon get fed up with typing out command and file names in full, then dealing with the error messages resulting from misspellings. Fortunately the shell provides a way to both save typing and avoid mistakes called tab completion.

The name is fairly self-explanatory – it uses the Tab key to complete the word you are typing. If this is the first word on a line, it will be a command, so it looks in the command path for matches, for example typing chm and hitting Tab will complete to chmod.

Used after the command, the Tab completes on file names, so instead of typing:

cat /pathto/somelongdirectory/someevenlongerfilename.txt

you can use:

cat /pa[press TAB]som[press TAB]som[press TAB]

Isn't that easier? When more than one file matches, the Tab key will complete up to the point where it becomes ambiguous; pressing Tab again at this point shows a list of options, which you can cycle through with Tab, or add another letter or two and press Tab again. It is actually a lot easier to use than describe – just try it.

Wildcards

Linux terminal

There are times you want to include more than one file in a command but don't want to type them all out. The Linux shell has a couple of 'wildcard' operators to help with this. The most used one is the star, which is used as a replacement for any string of characters.

So * on its own will match every file in the current directory (that this is different from MS-DOS shells where * does not match . and you need to use *.* to match any file with an extension).

You can also use * to match one part of a file name: *.txt matches all files that end with .txt, and a*.txt matches only those that also start with a.

This matching is performed by the shell. It expands the matches to a list of files before passing them to the command, which never sees the wildcard or even knows that you used one.

This can be an important distinction, especially if you want to pass a * to the program you're running. For example, say you're using scp to copy files from a remote computer and run the following:

scp user@othercomputer:Documents/*.txt Documents/

You may expect this to copy all .txt files from the other computer's Documents directory to the same one here, but it won't. The shell expands the *.txt to match all .txt files on the local system, so you copy only the files you already have.

In such an instance, you need to tell the shell not to expand the * by preceding it by a backslash, known as escaping it:

scp user@othercomputer:Documents/\*.txt Documents/

Now it passes Documents/*.txt unchanged to the remote computer and lets its shell handle the expansion.

There's a second wildcard character, too. While * matches any number of characters, including none, ? matches exactly one. So ab?.txt matches abc.txt and ab1.txt but not ab.txt or abcd.txt, whereas ab*.txt would match all of them.

Command substitution

Linux terminal

There is a powerful feature in shells called command substitution. This allows you to embed the output from one command in another.

As a simple example, let's say there is a command called foo on your system and let's say you want to know what type of program it is: compiled, Python or even a shell script. The which command gives you the path to a program, and file reports the type of a file. You could use:

which foo

to get /usr/local/bin/foo and then

file /usr/local/bin/foo

to get the file type, but even with copy and paste, this is a lot of work and easy to mistype. Alternatively, you could do:

file $(which foo)
/usr/local/bin/foo: a /usr/bin/perl script, ASCII text executable

What happens is that the shell runs whatever is inside $(..) and substitutes the output from that into the command line before running it. You can also use backticks for this:

file 'which foo'

This is quicker to type but less readable, especially when posted to a forum where the reader's font can make ' and ' look similar. With the first format there is no such confusion.

Terminal time-savers: repeat

history

One of the great advantages of the shell is that it's simple to repeat commands, no matter how complex, with a couple of keypresses. At its simplest, you can press the Up key to show previous commands, then press Enter to run your chosen one again.

You can also edit the command before running it, if you like. That's fine if you want to use one of the last few commands you ran, but most shells keep a history of the last 500 or so commands that you can access again.

To avoid wearing out your keyboard's Up arrow key (and your eyes), press Ctrl-R and then type in part of the command. The terminal will show you the most recent command that matches what you are typing, updating with each keypress.

If you have run several very similar commands, you don't need to keep typing – just type a few characters and press Ctrl-R again to see the previous match. Keep going until you find the one you want. (Don't be alarmed – this is one of those things that takes far longer to describe than to actually do.)

You can edit the command before running it. The search term that you type in doesn't have to be the command itself – any part of the command line will match, so you could start with the file name.

You can also access commands within the history directly. The ! character tells the shell that you are referring to its history. !! is a shortcut for the previous command while !-n means 'execute the command run n commands ago' (so !! is the same as !-1). !xyz runs the last command starting with xyz, and !?xyz does the same for the last command containing xyz (much the same as Ctrl-R does).













http://rss.feedsportal.com/c/669/f/9809/s/4a53327e/sc/15/l/0L0Stechradar0N0Cus0Chow0Eto0Ccomputing0Csix0Elinux0Eterminal0Etime0Esavers0E130A54860Dsrc0Frss0Gattr0Fall/story01.htm

Sent with Reeder



Aron

Brief message sent from a handheld device.