NAS Hacking


in Linux

A while back, we close to filling up the partition on our desktop machine with photos, so I decided to get a second hard drive. In the end, instead of a hard drive, I decided to by the WD My … Continue reading

Restore Default Panels


in Ubuntu

Been using these commands quite a bit recently as I experiment with moving the panels about. gconftool –recursive-unset /apps/panel pkill gnome-panel from Watching the Net

Delete directories older than 90 days


in Linux

find /var/log/hostdb/* –type d –mtime +90 –exec rm –rf {} ; –type d only look at directories, f would be files –mtime +90 modified time greater than 90 days ago

Load CSV data into MySQL


in MySQL

load data local infile ‘export.csv’ into table table_name fields terminated by ‘,’ enclosed by ‘“‘ lines terminated by ‘n’ (field_list)

Useful SQL


in MySQL

update [table_name] set [field_name] = replace([field_name], ‘[string_to_find]’, ‘[string_to_replace]’); Replace within a field