A big collection of Unix/Linux 'find' command examples

Linux/Unix FAQ: Can you share some Linux find command examples?

Sure. The Unix/Linux find command is very powerful. It can search the entire filesystem to find files and directories according to the search criteria you specify. Besides using the find command to locate files, you can also execute other Linux commands (grep, mv, rm, etc.) on the files and directories you find, which makes find extremely powerful.

A Scala “functional programming style” To-Do List application

Back when I was writing Functional Programming, Simplified I started to write a little Scala/FP “To-Do List” application that you can run from the command line. For reasons I don’t remember, I decided not to include it in the book, and forgot about it until I recently started using GraalVM (what I call Graal).

Graal includes a native image feature lets you compile JVM classes and JAR files into native executables, so as I thought about things I can make faster, I was reminded of the To-Do List app and thought about how cool it would be if it started instantaneously. So I found the old project, blew the dust off of it (updated all of its dependencies), and made a few additions so I could create (a) a single, executable JAR file with sbt-assembly, and (b) a native executable with Graal.

Drupal Console project

After being away from Drupal work for a long time, I just got back into it, and right away ran into a problem with Drupal 8 where, after migrating a Drupal 6 site to Drupal 8, I was unable to log into the new Drupal 8 website. I have no idea what the migration process set my user password to, but it wasn’t any of the ones I used on the old Drupal 6 website or on the new Drupal 8 website — probably because the migration process zapped my Drupal User 1 account.

Long story short, instead of using drush, I decided to use the Drupal Console project to reset the password, and it worked as advertised. After installing the Console project, just type drupal list | grep password to see the command to reset the password, and then use it. At the time of this writing the command is drupal user:password:reset. I have no idea if that will change in the future, but for now you can type that command and then respond to the prompts. You’ll need the User ID for the account that you want to modify, and you can get that by looking at the Drupal 8 users and users_field_data tables.

A collection of 75+ free Linux tutorials

Free Unix and Linux tutorials: Wow, this blog post makes me feel a little old. As I've been working on reorganizing the website lately, I found that I've written more than seventy-five Unix and Linux tutorials. To try to make them easier to find, I created this page to link most of them up.

So, to that end, here is a list of at least 75 free Unix and Linux tutorials I've written. I hope you enjoy them, and I hope they're helpful.

Use zgrep to grep a gzip (gz) file

Linux zgrep FAQ: How do I use the Linux zgrep command? (Or, How do I grep a GZ file?)

Linux users quickly learn how to use the Linux grep command on plain text files, but it takes a little longer to really you can grep gzip (gz) files as well. Here's how.

How to sort the Linux 'ps' command output by RAM

With this site hosted on a virtual server, I'm fighting quite a battle over memory use with the new LAMP architecture in place. As I try to learn more about which applications are using the most memory, I ran into this cool ps command last night that sorts the ps output by memory use, specifically by the rss field:

ps aux --sort:rss

Here's the important output from that command:

Linux `sort` command examples

Linux sort command FAQ: Can you share some examples of the Unix/Linux sort command?

As its name implies, the Unix/Linux sort command lets you sort text information. This article shares several examples of the Linux sort command.

Sorting ls command output

You can use the Linux sort command to sort all kinds of output from other commands. For instance, here's an example where I sort the output of the ls -al command:

grep reverse: how to reverse the meaning of a `grep` search


You need to reverse the meaning of a search you're performing with the grep command. For instance, you've been searching for pepperoni pizza orders like this:

grep pepperoni pizza-orders.txt

and now you need to find all orders that don't have pepperoni.


Just add the -v switch to your grep search command, like this:

What is the command to change my Glassfish admin password?

Question: What is the command to change my Glassfish admin (administrator) password?

Answer: You can change the Glassfish admin password with this asadmin command:

asadmin change-admin-password

The Glassfish master password

Note that you can also change the Glassfish master password with this command:

asadmin change-master-password