How to check cp progress after cp has started

First, the easier way to do this is to use rsync in the first place. rsync -avh --progress sourceDirectory destinationDirectory However, sometime you think cp will be quick and you already kicked it off. Here is a quick way to check the progress of a copy command after you've already …

Ubuntu Command line Display Driver Change

Recently upgraded to 15.10 and that looked okay at first. However, the displa driver that it installed, NVIDIA, was causing issues. So I defaulted back to the open source driver and reboot. MISTAKE! Ended up causing the system to crash and couldn't do anything about it. I rebooted into …

Failed to spawn command gulp

I ran in to the error with Atom, Failed to spawn command gulp. The solution for me was to install the module globally. $ sudo npm install -g gulp /usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js gulp@3.9.0 /usr/lib/node_modules/gulp ├── [email protected]

GIT push from one repo to another

Splitting off from a branch to another git repo seems like it would suck. In reality it's simple. Two lines and you're set. Things you'll need: Source repo pulled down locally Target repo created on your git server (GitHub, BitBucket, GitLab, etc) Url for target git repo Branches \$ cd /path …

Bash test if file exists

Using bash I needed to check that a file exists, then do something. This one turns out to be super simple. I wanted to conditionally load a db file if it existed in this case. What I needed was, a check for the file in bash. Then execute the command …

Add user to existing group

This is dead simple. I often need to add a new user to the sudoer group, "sudo" by default. sudo usermod -a -G groupName userName So for adding a user to the sudoers group. sudo usermod -a -G sudo {username}

Linux add user

The simple way to add a user is to use the linux interactive mode. sudo adduser {username} Then let it guide you through the setup.

How to find large volumes on linux

Running linux machines sometimes it's needed to figure out what is taking up a large amount of room on a server. Here's an easy way to investigate large directories. du -h <dir> | grep '\[0-9:::.\]+G'

7z file encryption with password

Previously I've transferred file with a pgp key, but this is an ok alternative. 7za a -tzip -psuperSecurePassword -mem=AES256 file.doc file1.doc file2.doc You can also checkout the easier and more supported zip method.

Password protect a zip file

Sometime a simple encrypt with a password is needed. This isn't the most secure method (7z provides more secure methods), but is better than nothing. I simple way to do it is to create a zip password protected with all the files. zip --password yourpassword file.doc file1 …