Posts tagged folder

Scrub – File Shredding for Linux

With this handy little app you can shred files and folders, but more conveniently you can shred your entire free space. Just make sure you’ve erased all the files you want to shred. Empty the trans, issue:

sudo apt-get autoclean && localepurge

Download scrub from Sourceforge:

http://sourceforge.net/projects/diskscrub

Its a simply source so configure, make and install. It will install a binary in the global path. You can run it at a user or as root. Run scrub accordingly to shred all free space:

sudo scrub -X ~/scrub

This will create a directory, in your home folder, called scrub and fill it with files created from free space. It will then shred them substantially. You can use the -r option, with scrub, to attempt to delete the scrub folder afterward, but it never worked for me. Just make a script as follows:

#!/bin/bash
sudo scrub -X ~/scrub
rm -r ~/scrub

Make it executable, and this will ensure that the folder is deleted after the process is complete. You can make this a cronjob to run it at night. Like at 3 in the morning. It will take hours on a relatively large drive. Maybe an hour per 50 gigs.

Cell Phones – The Best of Both Worlds – Blackberry, iPhone, etc…

The best of both worlds is not achievable. Your Blackberry is the ultimate communications device. The messages folder consolidates all email, SMS, MMS, and instant message communications into a single icon. The instant messaging feature further consolidates AIM, MSN Messenger, Blackberry Messenger, and countless other services. The messages folder also accecpts facebook notifications, and makes it seamless to conversate back and forth indepentent of the communications platform.

The iPhone on the other hand is the ultimate applications device. It is as close as it gets to a MID (Mobile Internet Device) without having a full blown version of Windows XP. There are countless application in the iPhone apps store, providing every function ever wanted. Games, media, ect…. the iPhone is unparalleled. Maybe the Motorola Droid will give the iPhone a run for its money, but it is still the iPhone. It is Apples telephone. How can you compete with that?

Google does indeed have its own operating system, and applications store. made fairly popular with the various Android based cellphone, their version of the appstore has many applications. It is indeed a noticable competitor to Apple’s appstore, and it is tempting to see what all the hype is about. I think the new Droid coming out should be very interesting, but once again there is no cellphone that will have the best of both worlds.

Even Blackberry has an appworld now. There are many applications that are suited very nicely for the storm. And with the new 5.0 software upgrade, which is outstanding, the Storm has been even more appealing. Overall the communications abilities of Blackberrys are unparalleled. The applications on the iPhone are unparalleled. And no existing, or soon to exist phone will have the best of both worlds.

VirtualBox – Seamless Mode With Windows and Linux Sharing Same Desktop

VirtualBox seamless mode places the Windows taskbar above your Gnome or KDE taskbar. The Windows desktop is not displayed. When you open a Firefox or Internet Explorer web browser, from the Windows taskbar and save a file from a website, it will save to the Windows desktop. To compensate you can allow Windows to share the exact same desktop as your host Linux OS. You can save files from Windows web browsers directly to the shared Linux desktop. Essential this is taking seamless a step further!! First enable VirtualBox shared folder support for your desired guest OS. Make the shared folder either your Linux desktop directly, or simply your home directory. Then mount the shared folder in the guest OS:

net use x: vboxsvrDesktop

Then open regedit. Locate the key:

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders]

Change the desktop key to:

1) x: ; if you set the shared folder to be your Linux desktop folder

2) x:Desktop ; if you set the shared folder to be your Linux home folder

Now just reboot your Windows guest OS and observe the seamless consolidation of your Windows and Linux desktops!! This is one of my favorite Linux tweaks :)

I now run the virtual server in headless mode. If your interested in my new desktop configuration you can see it in this post!! Its frikkin cool. On my system notice that a virtual server environment is running in the top right window. That is the actual server environment that is hosting this website.

Cron Server Backup Scripts

Update: Don’t configure cron.hourly etc. manually. Configure it with crontab.

I use three scripts that completely backup my entire server. Two scripts I place in my cron.hourly folder, and one I use in my cron.daily. For hourly backup I export all my databases, and then transfer them via an automated ssh connection to another computer on my local area network. For Mysql database export I use a wonderful script that I found on sourceforge http://sourceforge.net/projects/automysqlbackup/. It has a couple of configurations, and all is self explanatory when you open the file in a text editor. Once your done editing the file to suit your mysql parameters, and desired backup folder location, just plop the file in your /etc/cron.hourly to have it run every hour. Then you can use ssh to transfer the mysql backup folder to another computer!! Make a simple script as follows:

scp /home/user/mysqlbackup/* user@othercomputerip:mysqlbackup/

Use this format to make an automated script to transfer your mysqlbackup folder to another computer via ssh. As with the mysql export script, when your done with the ssh transfer script just plop it in your /etc/cron.hourly folder for automated hourly operation. I also use a daily backup script to transfer, via ssh, my entire website directory. Since I have about 10 GB on the directory, due to the file repository, the ssh over LAN connection comes in handy due to its relatively high speed. Getting speed around 7.7 Mb/s the entire root server directory is backed up in about 15 minutes. To do this just use the same formatting as the ssh transfer script above, but set the directory to be your root server directory. You can place the script in your /etc/cron.daily folder, or any other for that matter :)