• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Twitter GitHub
You are here: Home / Archives for command line

command line

License for my Open Source Software

Last updated on August 27, 2019 by Sal Ferrarello

These are my reminder notes on how to quickly populate the LICENSE information for one of my projects from the command line.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Programming, Recommendations Tagged With: command line

Git Target Commit by Message

Last updated on June 11, 2018 by Sal Ferrarello

There are lots of ways to target a git commit and one way that I often forget to use (but really like it when I remember) is targeting a specific git commit by the commit message.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: command line, Git

Checksum on Mac OS X Command Line

Last updated on June 11, 2018 by Sal Ferrarello

The checksum is like a fingerprint for the file. A file is processed through a known algorithm which results in the checksum, a.k.a “hash”, which is a string of letters and numbers unique to that file, e.g. 8ab686eafeb1f44702738c8b0f24f2567c36da6d. If the file is modified, the resulting checksum will be different. This allows a quick way to […]

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Solution Tagged With: command line

Command Line Delete All Directories Except One

Last updated on June 18, 2018 by Sal Ferrarello

On the Mac OS X bash command line, you can delete all directories, with the exception of one, in the following way. If our current directory has sub-directories and we want to delete all of them except, ./really-important-do-not-delete, we can run $ shopt -s extglob $ rm -rf !(really-important-do-not-delete) $ ls really-important-do-not-delete $ original source

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Solution Tagged With: command line

Command Line Find

Last updated on May 23, 2018 by Sal Ferrarello

Since I’m always forgetting the format for the command line “find” command, I’ve made a note of it here.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line

MySQL Paging Lots of Results

Last updated on May 8, 2018 by Sal Ferrarello

I’ve recently moved to using the terminal program alacritty, which does not natively do paging. This is not generally a problem since I can pipe results to less. $ ls dir-w-lots-of-files | less However, I found myself working in command line MySQL and I got LOTS of results but could not page back. It turns […]

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: command line, MySQL

The 'which' command and a pair of pants on fire (a reference to being a liar)

When command line “which” gives the wrong result

Last updated on January 29, 2021 by Sal Ferrarello

There is a very useful command line tool called which. This tool determines which file will be executed when you type it. Unfortunately, this command can sometimes provide the wrong answer. Newest Update: I was using bash as my terminal shell when I wrote this article. Now, I’m using zsh and with this shell the […]

Filed Under: Computing, Dev Tips, Solution Tagged With: command line

The Git and Vim Logos Together

Using Vim to View Git Commits

Last updated on February 23, 2018 by Sal Ferrarello

This tweet blew my mind. $ git log | vim -R –Now press <K> on a commit hash. — Luke Diamand (@LukeDiamand) February 21, 2018 I spend a lot of my time in Vim and Git and this is an amazing combination of the two. While I love this command, I think we can do […]

Filed Under: Computing, Dev Tips Tagged With: command line, Git, vim

Command line output from running command to install multiple plugins.

Install Multiple WordPress Plugins with WP CLI

Last updated on January 24, 2018 by Sal Ferrarello

At a recent WordPress meetup we were discussing WP CLI and the comment came up, “When setting up a site, it would be nice to install a bunch of plugins with a single command.” Fortunately a WordPress meetup is a great place to bounce ideas off of smart people and find a solution. Solution 1: […]

Filed Under: Dev Tips, Programming, Solution Tagged With: command line, WordPress, wp-cli

Screenshot of wp find-content command being run to find a specific Gravity Form shortcode

Search WordPress Post and Post Meta

Last updated on January 11, 2018 by Sal Ferrarello

Recently, I had to find instances of where specific Gravity Forms were being used. This came with multiple challenges. Challenges Searching for gravityform id=”7″ returns results for just gravityform (i.e. too many results) If the gravity form appears in post meta (rather than the primary content), it is excluded (i.e. missing results) SQL Solution Find […]

Filed Under: Programming, Solution Tagged With: command line, MySQL, WordPress, wp-cli

  • «Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Next Page»

Copyright © 2021 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in