Docker can be tricky to debug. There’s instances where after upgrading a container the volume that was previously attached fails to work. In this case it was a dev image and the quickest, and dirtiest, option was to clear out and rebuild. I could go one by one to delete the specific volumes. Instead I Read more about Docker remove ALL volumes not attached[…]
I needed to grep a directory, and sub directories, and not displaying the filenames in the output. This is when the man page came to the rescue. Output There we go, -h, –no-filename, is what I needed. Example with output to a file:
I was executing a vagrant up on my machine. It was giving an nfs error. I went hunting for a resolution. I need to install nfs libs. Then it would boot.
Needed to head all files in a directory.
I needed a simple html only scraper. (This doesn’t use js, won’t pull down data via AJAX). I found an example on another site, thetaranights.com, but it wasn’t exactly what I needed. It only pulled the data and printed it to screen. I added a list to loop through and auto saving by url name Read more about Simple Python Web Scraper[…]
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 started. watch lsof -p`pgrep -x Read more about How to check cp progress after cp has started[…]
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 root terminal. Then ran a command to Read more about Ubuntu Command line Display Driver Change[…]
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] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ([email protected]) ├── [email protected] ([email protected]) ├── [email protected] ├── [email protected] ([email protected], [email protected], Read more about Failed to spawn command gulp[…]
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. In this instance it was to Read more about Bash test if file exists[…]
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.