From the /usr/local/mysql/bin directory you can use the following command: ./mysqldump –add-drop-table databasefilename > backup.sql
-
-
Viewing Folder Sizes from the Command Line in Mac OS X
Here’s a lovely command for figuring out how much disk space each folder on a drive consumes. It is an excellent command to run if the currently logged in user does not have sufficient read permissions to view the used space on the directory in the Finder. By default it runs on the current directory. So navigate to the hard drive’s root folder and run this command: sudo du -xhd 1 In this case, the “x” instructs the system not to traverse file system mount points (so /Volumes is skipped), the “h” expresses results in human readable format (G for gigabytes, M for megabytes, K for kilobytes, B for bytes,…
-
Linux: Poptop
Poptop is an open source PPTP VPN server. It’s a bit easier to use than openVPN but doesn’t have a lot of the features available there. There is no L2TP but you can run PPTP.
-
Add a comma to the end of every line of a file in bash
Add a comma to the end of every line of a file in bash: sed 's/$/,/'
-
FTP Command Line and Automation
The ftp command that runs on a Mac is similar to that from any other platform, including Windows – and not much has changed with regard to FTP for a long, long time. When using FTP you will login to an FTP server, then issue some commands, one of which will kill your session to the host. The commands you issue during an FTP session are issued in an interactive mode of the shell, where you are actually running them against the target server ls – list the contents of a directory on the FTP server cd – change the working directory on the FTP server pwd – show the…
-
Open Source Projects at SGI
http://oss.sgi.com
-
Dual Chroot'd DNS Servers
Sweet: http://www.etherboy.com/dns/chrootdns.html
-
If/Then/Else From Bash Programmers Manual
#!/bin/bash if [ "foo" = "foo" ]; then echo expression evaluated as true else echo expression evaluated as false fi
-
Splunk.com
Best log analyzer ever. For centralizing and reviewing logs on lots of servers it’s a must have.
-
Directory Listing with Permissions
To list the files in a directory with the permissions for files, use the following command (assuming you’re in the working directory you would like to list files for: ls -al