Archive for October, 2010

VirtualBox Fedora 13 install guest additions

Install packages needed

yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
in VirtualBox devices, select install guest additions
sh VBoxLinuxAdditions.run

  • Share/Save/Bookmark

VirtualBox Fedora 13 guest use shared folder

Fedora 13 as guest OS on a Windows 7 host

Add a shared folder in virtualbox’s devices settings.
create a folder “Shared” in fedora
su –c “mount.vboxsf Shared ~/Shared -o rw,exec,uid=1000,gid=1000,dev”

  • Share/Save/Bookmark

Create multiple volumn zip backup with MD5 check

Download and install p7zip:
http://p7zip.sourceforge.net/

Then use 7z
Code:

7z a -v50m test.zip your-big-file-paths

this makes 50 MB volumes called
Code:

test.zip.001 test.zip.002 test.zip.003 test.zip.004

To extract them just run
Code:


7z x test.zip.001

make md5

# md5sum test.zip.* > MD5SUM
# cat MD5SUM
cb16175f4acad02f977f74d5c142879b test.zip.001
33c745ca49ab6e63b727658ec148cf67 test.zip.002
14e6952b632fbb7f4c0731067afdb46c test.zip.003
....

check md5

# md5sum --check MD5SUM

  • Share/Save/Bookmark

SVN make a sub folder to a seperate new repository


svnadmin dump /svn/old_repos > ./repository.dump
svndumpfilter include path/to/docs --drop-empty-revs --renumber-revs --preserve-revprops < ./repository.dump > ./docs_only.dump
svnadmin load /svn/new_repos < ./docs_only.dump

  • Share/Save/Bookmark

Open and edit files from remote server

In my workplace, every developer needs to work on own directory in a shared dev server.

Here is the command I ran to open my directory and edit my files remotely.

1
sshfs username@192.168.0.6:/remote/directory/path /mount/to/your/local/directory/path

* 192.168.0.6 is IP of remote server.

After you ran this, access to /mount/to/your/local/directory/path directory is same as access to remote directory.

Have fun. :)

  • Share/Save/Bookmark

Remove svn directories and files

Deleting all SVN files and directories is a headache if your project contains lots of directories.

Here is a easy way to delete them with one command.

1
find /path/to/your/directory -type d -name .svn -exec rm -rf '{}' +
  • Share/Save/Bookmark