• 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

grep inside gzipped files

Last updated on September 24, 2018 by Sal Ferrarello

When faced with a folder full of gzipped files, I found I was unable to use my usual go to program grep to search for text in the files. However, zgrep came to my rescue.

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

Filed Under: Draft, Solution Tagged With: command line, grep, gzip

DIG and WHOIS returning different name servers

Last updated on August 27, 2018 by Sal Ferrarello

You can look up the name servers associated with a domain name using either “whois” or “dig NS”. In some rare occasions, I have gotten back two different answers using these two techniques. In my experience, “dig NS” is the more trustworthy of the two.

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

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

Generate SSH Key Pair

Last updated on September 30, 2019 by Sal Ferrarello

Using SSH keys allows greater security than a password when remoting into a machine, using SFTP, or WP CLI on a remote machine – however, they do require more work to setup. For security reasons, I generate a new key pair for each site I work on. To generate a new key pair I do the following.

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

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

Activity Monitor find App behind Process Name

Last updated on July 30, 2018 by Sal Ferrarello

When working on my Mac, sometimes I find a process in Activity Monitor and I want to know what application the process belongs to. I was introduced to this command to do just that.

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

Filed Under: Computing, Dev Tips, Draft, Solution Tagged With: 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

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

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