Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
I recently found myself with the need to connect to a Mongo DB instance from a PHP application running on Amazon EC2. The PHP docs led me to this MongoDB extension, which seemed to be a good fit for my needs. Still, the matter of installation was a little bit less clear, considering that the EC2 instance was pretty barebones and lacked a fair number of the “standard” libraries that would enable this single line installation to work.
After a bit of finagling, I got everything to work via the steps I’ve outlined below.
Changes to my php.ini file kept getting overwritten, until I found where the real file was being loaded from! Here’s how to update php.ini for MAMP PRO.
Here’s a tutorial that explains how to set your Mac to use IPv4 instead of IPv6. Instructions have been tested and confirmed on macOS Sierra (10.12.3), though this should work on other OS versions too.
If you’re SSH’d into a MySQL server and want to export MySQL query results to CSV (readable by Excel), simply add the below snippet to the end of your query.
INTO OUTFILE '/tmp/results.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'
Note that ‘/tmp/results.csv’ in the code above should correspond to a writeable destination, and the file can’t already exist.