|
Adding a Date Element to a Backup
|
|
|
|
Whenever I backup a file I like to add a date to the end instead of just BackUp or BU. This is how I do it.
Lets say the file is named foo.bar, simply:
cp foo.bar{,.`date +%F`}
And foo.bar.<yyyy>-<mm>-<dd> will appear in the current folder
|
| |
|
|
Registering the ssh protocol
You need to tell Firefox which program it should use for that particular protocol.
Linux, Mac OS:
Firefox gets its protocol information from its hidden settings.
- In the Location bar, type about:config, and press Enter/Return.
* The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page.
- Right-click Hold down the Ctrl key while you click anywhere in the grid, choose New, then String.
- In the Enter the preference name prompt, type in:
network.protocol-handler.app.<my protocol> (replacing myprotocol with the protocol you want to register) and press OK.
- In the Enter string value prompt, type the path to the program you want the protocol to start and press OK.
Now that the protocol has been registered, try the link again. You may get an External Protocol Request dialog. Click Launch Application. The program you chose should now start.
* Still not working? Make sure that the path you put in the preference is correct. Due to a bug in Firefox, entering an incorrect path will give you the same error message.
Here's the protocol for ssh:
Preference Name: network.protocol-handler.app.ssh
Value: /usr/bin/nautilus
|
| |
|
Adding Sun Java to Ubuntu 10.10
|
|
|
|
To install Sun's Java 6 JDK on Ubuntu 10.10, obtain root privileges then add the Sun Java6 Community PPA and install:
add-apt-repository ppa:sun-java-community-team/sun-java6
aptitude update
aptitude install sun-java6-jdk sun-java6-demo openjdk-6-doc sun-java6-source sun-java6-plugin ia32-sun-java6-plugin sun-java6-fonts ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming libmyodbc odbc-postgresql tdsodbc unixodbc-bin
Press 'Y' and enter, then wait for the packages to install.
When the packages have finished installing, type:
update-java-alternatives -s java-6-sun
and that should do it...
|
| |
|
My SPAM folder gets out of hand in a hurry, so here is what I do to keep it under control.
This assumes that all of your spam folders are under a vmail directory, this could be adjusted to suit any base directory.
Move to your /etc/cron.weekly folder, and create a file called clean-spam-folder.sh
cd /etc/cron.weekly
touch clean-spam-folder.sh
chmod guo+x clean-spam-folder.sh
Now add the following to the file you've just created
#!/bin/bash
BASEDIR=/home/vmail
for i in `find $BASEDIR -iname *spam`
do
echo "Moving to $i";
cd $i;
echo "Currently Contains:";
ls;
logger -s -t ClearSPAM "Clearing $i with \"rm -rdf ${i}/*\"";
rm -vrdf ${i}/* | logger -s -t ClearSPAM
echo; echo;
done
This will also log what is done to your syslog.
Done...
|
| |
|
|
|
|
Page 1 of 12 |