Scala, Java, Unix, MacOS tutorials (page 348)

Linux cut command FAQ: Can you share some Linux cut command examples?

The Linux cut command is a really great command filter to know. You can use it to do all sorts of cool things when processing text files and text in command pipelines.

Using the cut command with /etc/passwd

For a first cut command example, I'll use the /etc/passwd file on my Unix system. I use this file because fields in the file are separated by the ":" character, which make it very easy to work with.

Unix/Linux file ownership FAQ: How do I use the chown command?

The chown command is most commonly used by Unix/Linux system administrators who need to fix a permissions problem with a file or directory, or many files and many directories.

For instance, suppose you want files to be owned by the user "nobody", but when you issue an ls command, you see that they're owned by the user "fred", like this:

Linux command FAQ: Can you share some examples of the Linux ping command?

You typically use the Linux ping command to test to see whether a remote server is up and running, or to test problems with a network. For instance, my internet connection here in Alaska tends to get flaky from time to time, and when things appear to be going bad, I use the ping command to verify the problem.

Basic ping example

In its basic use, you just issue the ping command followed by the name of a server or website, like this:

2011 Iditarod News: Some times you just happen to be in the right place at the right time. At the Iditarod "restart"event in Willow, Alaska today, I happened to be standing at the starting gate when four-time Iditarod champion Lance Mackey stepped on the dog sled and headed for Nome, Alaska. Here's a link to the video on my One Man's Alaska website: 

Drupal block/view FAQ: How do I insert a Drupal block or Drupal view into my HTML content area ($content)?

There are several different approaches to this problem, depending on what you really want to achieve.

Insert a Drupal view into your HTML content

If you really want to include a Drupal view into your Drupal content, you can use the Insert View filter, as described on this Inserting Views page on drupal.org.

Apple MacBook discounts/sales news: Just a quick note here that if you're looking for discounted Apple MacBook computers and other Apple products, take a look at Apple's refurbished store. As I continue shopping for new MacBook Pro and MacBook Air models, I just stumbled across the "refurbished" page in the Apple Store, where they have big savings on most MacBook and iMac models, as well as other Apple products.

For instance, they currently have these MacBook discounts:

MacBook Air SSD speed FAQ: How much faster is the MacBook Air SSD storage system compared to a typical MacBook HDD (i.e., MacBook Air SSD v. HDD performance)?

I'm looking at buying a new MacBook Air in the next few weeks, and one of the things I've been intrigued by is the MacBook Air SSD speed/performance. I know Apple claims the MacBook Air is an "instant on" system when you lift the lid, and that implies a seriously fast "disk" subsystem, but how much faster is a MacBook Air SSD (solid state drive) than a traditional MacBook HDD (hard disk drive)?

This page is an index to the Unix and Linux command tutorials and examples we've created. We've found that while Unix and Linux are powerful operating systems, its cryptic commands can sometimes be hard to remember, so hopefully these "Learn Unix by Example" tutorials will help make your Unix and Linux life easier.

[toc hidden:1]

Linux move/rename files FAQ: How do I rename or move Linux files and directories?

You use the Linux mv command to rename or move Linux files and directories. Let's look at some move/rename examples.

Using Linux mv to rename files and directories

At its most basic, here's how you rename a Linux file:

mv Chapter1 Chapter1.old

This mv command renames the file Chapter1 to the new filename Chapter1.old. (Renaming a file is the same as moving it.)

Linux FAQ: How do I delete files (remove files) on a Unix or Linux system?

The Linux rm command is used to remove files and directories. (As its name implies, this is a dangerous command, so be careful.)

Let's take a look at some rm command examples, starting from easy examples to more complicated examples.

Unix/Linux rm command examples - Deleting files

In its most basic use, the rm command can be used to remove one file, like this:

vim search FAQ: How do I perform a case-insensitive search in vim? (Or, How do I ignore case with a vi/vim search?)

Using the vi (or vim) editor you can perform a case-insensitive search by first issuing this "set" command:

:set ignorecase

As its name implies, this set command tells the vim editor to ignore case (uppercase or lowercase characters) in your vim search.

Learning Drupal: I read someone recently refer to the Drupal learning curve as the "Drupal learning cliff", which is actually very appropriate. While a content management system like Wordpress seems to come out of the box ready to go, even with Drupal 7 you need to add your own WYSIWYG HTML editor, Media plugins, page title modules, and more, just to get a basic Drupal website off the ground. Things like this leave a new Drupal user scratching their head and asking "Why?"

A Mac "quit all applications" app: I don't shut down or reboot my Mac computers very often, but every time I do, I always wonder if there's an easy way to quit all applications with one or two keystrokes. I don't mind having to quit all the apps manually -- that seems like the natural thing to do -- but if you're about to have a lightning storm and you'd really like to shut down your Mac fast, being able to quit all applications fast sure would be nice.

MacBook battery life news (March, 2011): As I was returning from vacation today, I decided to stop at Best Buy to look at Apple's new MacBook Pro models, as well as their MacBook Air. I've been thinking about buying a MacBook Air or Pro for the last few weeks, but what hit me today when looking at these models is that Apple's MacBook battery life claims have suddenly been reduced by 3-5 hours.

Case insensitive SQL SELECT query FAQ: How do I issue SQL SELECT queries while ignoring case (ignoring whether a string is uppercase or lowercase)?

Sorry for the inconvenience, but the old devdaily.com "directory", formerly available as URLs like these:

/Dir/...

has been removed. With terrific search engines like Google, there wasn't much need for the directory any more.

I'm sorry for the inconvenience. If I can help you find what you're looking for, just send me an email.

Thanks,
Alvin Alexander
devdaily.com

 

 

 

Mac backups and burn folders FAQ: How do I make Mac backups (CD/DVD backups) with Mac burn folders?

Wow, I've become a big fan of Mac OS X burn folders lately. Once I realized how much they simplify the process of making Mac backups I've been completely sold on them. Mac burn folders make the Mac backup process so easy I actually take the time to make them on a regular basis.

Mac antivirus software FAQ: What Mac antivirus software should I use? (Also written as, "Do I need Mac anti-virus software?" or "Should I use any Mac antivirus software at all?")

Mac backup options FAQ: How can I backup my Mac (iMac, MacBook, MacBook Pro)? What are my options?

There are several different ways to create Mac backups. We can break all these approaches down into two main approaches:

I just read on techradar that both T-Mobile and Orange have reduced their iPad prices, most likely to reduce inventory for a new iPad 2 model. This is of particular interest to me, because I've been reading a lot of books with the Kindle software lately, and I'd like to buy an iPad soon to make that reading experience more enjoyable.