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 …
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 …
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 [email protected] /usr/lib/node_modules/gulp ├── [email protected] …
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 …
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 …
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}
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'
Previously I've transferred file with a pgp key, but this is an ok alternative. 7za a -tzip -psuperSecurePassword -mem=AES256 filename.zip file.doc file1.doc file2.doc You can also checkout the easier and more supported zip method.
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 filename.zip file.doc file1 …