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

command line

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

How To Use Git Bisect Logo

How To Use Git Bisect

Last updated on March 30, 2017 by Sal Ferrarello

Historically, when trying to track down a bug in my code I spent a lot of time trying to determine exactly where the bug appears in the code. On all of my projects I use Git for version control. Knowing exactly which commit introduced the bug helps me track down the bug. Git bisect is […]

Filed Under: Programming Tagged With: command line, Git

Git Case Sensitive Rename

Last updated on December 17, 2014 by Sal Ferrarello

One can rename a file with git mv however, if you try to use this technique to change the case of the filename it will fail and you’ll get fatal: destination exists. I prefer to keep all my filenames lowercase, so getting this to work is important to me. If I modified the filename case […]

Filed Under: Computing Tagged With: command line, Git

Replace Across Multiple Files

Last updated on May 18, 2014 by Sal Ferrarello

Replace All Instances of wolf with dog From the command line run ack ‘wolf’ -l –print0 | xargs -0 sed -i ” ‘s/wolf/dog/g’

Filed Under: Dev Tips Tagged With: command line

Command Line List Files in Tree View

Last updated on March 24, 2014 by Sal Ferrarello

List all subfolders with formatted output ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’ From: http://reviews.cnet.com/8301-13727_7-10402034-263.html

Filed Under: Computing Tagged With: command line

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

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