Often all I need is to find matches in a group of files of a single pattern. But I always forget the grep command for it. This does not come up very often – that’s probably why. In any case, thank you intarwebs for allowing me to have this cheat sheet that is my blog.
The line is:
grep -Riln "pattern-to-search" "path-to-search-directory"
-R is dereference-recursive option, where the search recurses into subdirectories but follows symlinks (use -r if no follow symlinks).
-i ignores case or searches case-insensitive
-l prints only files with pattern search matches
-n prints line numbers with output lines
One will need to ensure that compiler and development SSL library is available before specifying nvm installation in Ubuntu 14.04/16.04 LTS.
sudo apt install build-essential libssl-dev
Then get the package and install
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | sudo bash
After that, exit out of user account and login again. See if you can install a specific version of node js, let’s say 6.10.0. You can see what is available by issuing:
You should see all available version, including 6.10.0. To install:
nvm install 6.10.0
nvm use 6.10.0
Get some help by issuing
If you want multiple versions, install the other versions as necessary using the steps above. Would be good to select a default. If we want to default to 6.10.0 do the following:
nvm alias default 6.10.0
I use Vim 6+. I like to have basic things set up on vim to get going. Often though, I do not remember the setting commands. Simple things like syntax highlighting, auto-numbering of file lines, auto indentation, tab expansion and tab width in character spaces.
After installing vim on your POSIX compliant machine, go to your home directory and edit or create the new .vimrc file:
user@machine:~$ cd && vim .vimrc
Below is what I enter to get started:
To list installed packages:
sudo apt list --installed
sudo apt update
sudo apt upgrade -y
To output a create statement for a table in an operational database, one with appropriate and valid permissions can do the following:
pg_dump -t 'yourSchema.yourTableName' --schema-only yourDatabase > /path/to/filename.sql
This is especially useful for incremental backups of changing operational database.
I need a place on the Internet to publish my essays, notes and a portal to publish other products of my interest. Many years ago, I tried WordPress, and was none too impressed with it. I thought I would give it another go…
So, here we go.