Samstag, 6. Februar 2016

Solution: dd too slow on Mac OS X

Does your dd command seem to be far too slow on your MAC?
It is not the dd command that makes it slow, it's the device that you selected.
On a MAC there exist for an external attached USB device two names in the /dev/ tree (example):

/dev/disk3

and

/dev/rdisk3

If you copy from /dev/disk3 with dd command (does not depend much on the blocksize that you
selected) then you will get around 30Mbytes/s. Now if you choose /dev/rdisk3 then you can
get up to 300Mbytes/s (using a USB3.0 SATA adapter and a fast disk of course).

Thanks to Daoyluan Li (http://daoyuan.li/solution-dd-too-slow-on-mac-os-x/#comment-13896)
who found that solution!!!

Samstag, 7. November 2015

scp files from A to C or from C to A via intermediate host B



I have access to three different machines A, B and C like:A to BB to AB to CC to Bbut not from A to C and not from C to A because A and C are on a different network.
In order to transfer files from A to C or from C to A do the following:
ssh -fN -L 4567:C:22 username_of_B@B
and then to transfer a directory from C to A:
scp -r -P 4567 localhost:directory_on_C path_on_A_where_to_put_the_directory
to transfer a directory from A to C:scp -r -P 4567 directory_on_A_which_is_to_transfer localhost:path_on_C_where_to_put
and for transfering files:to transfer a file from C to A:
scp -P 4567 localhost:file_to_transfer_on_C path_on_A_where_to_put_the_file
to transfer a file from A to C:
scp -P 4567 file_on_A_which_to_transfer localhost:path_on_C_where_to_put_the_file


Even better is this command to rsync files from computer A to computer C (or vice versa)via intermediate computer B:
rsync -av -e 'ssh -o "ProxyCommand ssh username_at_computer_B@IP_of_computer_B exec nc %h %p 2greater/dev/null"' username_at_computer_C@IP_of_computer_C:directory_on_C_to_sync/* directory_on_A_to_sync/



the word "greater" in the line above has to be replaced with the greater symbol of the keyboard. I can not do it here because while saving it is being replaced with >

Sonntag, 1. Juni 2014

How to create a WiFi Hotspot on a linux machine in order to share the ethernet connection?

How to create a WiFi Hotspot on a linux machine in order to share the ethernet connection? I tried several days "all" solutions posted in the internet on my Macbook Pro running on SuSe 12.3 under gnome but nothing worked. My mobile devices (iphone, ipad) could see the created Hotspot but after connecting to it there was no internet connection. The simple solution was to set the "wireless security" to "none". For me no problem at all for that purpose I am using it. So here come the instructions: I use Networkmanager and the nm-applet. a) In nm-applet click on "Create New Wireless Network" Specify any name for "Network name" in the window that will open. Select "none" under "Wireless security" Select "Create" b) connect any wireless device to this newly created hotspot and press "Join Anyway" in case that the iOS will inform you that this hotspot is not connected to the internet. For me that and only that worked out.

Dienstag, 9. Juli 2013

How to save a partition via network to a different computer and later restore that partition after formatting the local disc

How to save a partition via network to a different computer and later restore that partition after formatting the local disc? 1) try to unmount the partition if possible 2) dd if=/dev/hda1 bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish user@hostname "dd of=filename.gz bs=1k" 3) format or do whatever you want to do with /dev/hda1 4) go to the remote computer "hostname" and execute following command there: dd if=filename.gz | ssh -c blowfish root@deadhost "gunzip -c | dd of=/dev/hda1 bs=1k" Thanks a lot to http://www.inference.phy.cam.ac.uk/saw27/notes/backup-hard-disk-partitions.html for this and many more useful tips!

Samstag, 6. April 2013

howto enable apple wireless keyboard to send message by pressing cmd-enter

How many key combinations have you tried in order to get the Apple wireless keyboard to send a message instead of inserting a carriage return? 100 as I did? More? Stop trying it because it is not possible without a Cydia tweak. Today I found the answer. Install the free Bluetooth Keyboard Helper from Matthias Ringwald and be happy. It translates the cmd-enter key into a |press 'Send' button" action in the messages.app.

Dienstag, 6. November 2012

enable wireless in suse linux on a macbook pro

If you install linux on a Macbook Pro then the wireless adapter is not automatically working. You need to install the firmware before you can use wireless: sudo zypper install b43-fwcutter sudo /usr/sbin/install_bcm43xx_firmware

Mittwoch, 17. Oktober 2012

debug IDL program that uses a shared library call

If you need to debug a IDL program that uses a shared library c-program then use qt creator! This program works perfect for this job. Just call the program and then choose: Debug -> Start debugging -> Start and Debug external Application Then choose the idl executable and the directory where to run IDL. An xterm will be opened with the IDL command prompt. Run your IDL program there. Open the c-program by file -> open file with... and set your breakpoints as you wish. The program is ready to be debugged! Very easy!!