Category Archives: Linux / Unix
Trouble Symlinking DocumentRoot on Shared Hosting
I ran into some trouble setting up Deployer on Media Temple's Grid service, and it took me awhile to find out the answer, so I figured I'd share it here.
Grepping for Terms on Separate Lines but Near Each Other
Connecting to a PPTP VPN from an OpenVZ CentOS VPS
Cronie Depends on Sendmail in CentOS 6
FastCGI errors after PHP upgrade
Updating Packages in an OpenVZ VPS
Sam Mingolelli has posted some useful solutions to common problems when running yum update inside an OpenVZ VE.
Directory Permissions for WordPress under Plesk/Linux
Jason Diehl describes the right way to setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories it uses to store uploads. Basically, you need to make sure that PHP’s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod’d to 777.
Installing Additional Software on Endian Firewall
Backing Up Files and MySQL Databases on Linux Servers
You’d think I’d have this memorized by now, but I always mess up the syntax and have to spend a few minutes digging through man pages or wading through search results to find it.
tar -czf [output-file.tar.gz] [input-directory]/
mysqldump -u [username] -p [database name] > [filename]
Updating OpenDNS With a Dynamic IP From an Endian Firewall
PHP Error Logs with Virtuozzo
Firewalling an OpenVZ node and containers
Relaying Qmail Through a Spam Filter
Skipping Disk Check When Rebooting Linux Server
If you don’t run a disk check on a Linux server in awhile and you reboot, it may force a disk check, which can take 30+ minutes, and it’ll be offline the entire time. You can reboot and skip the check with shutdown -fr now or force a check with shutdown -Fr now. (via go2linux.org)
Convert Filenames to Lowercase on Linux
NTP Service Doesn’t Start Serving Until It Stablizes
Find largest directories on a Linux box
These commands will return the largest 10 directories on a Linux box.
du -k / | sort -n | tail -20
via peterbe.com
Find recently modified files in Linux
This will list all the files on a Linux system that were modified in the past 5 days
find /path/to/start/at -mtime -5 -print
Finding a string inside multiple files on Linux
Snipplr has a good article on how to find all of the files on a Linux system that contain a specific string.
find /the/path/to/start/at |xargs grep 'the string' -sl
The search will include subfolders.