I’ve been keeping a list of things I’ve had to look up for school or work, programming wise, and I thought it might be helpful to list them here. It’s more of a reference than anything, and I know it helps me to look back on it if I forget something little, so maybe someone else will find it useful too.
to execute a premade .sql file
mysql -p -D databasename < file.sql
find/replace in Emacs (discriminately, that is: it will ask you at each instance if you want to replace)
M-x query-replace <ENTER>
- space – replace
- n – skip
- enter – quit
cat a bunch of files together into one
cat file1 file2 > allfiles
cat file* > allfiles
to get unix time in bash
to get unix time in mySQL
rename a table in mySQL
RENAME TABLE oldname TO newname;
I’ll probably add more as I find them.