Terminal says permission denied My external usb wont open or i cant do anything on it. I have tried to restore it using disk utility but i doesnt work either. PLease help me
If I see your screen correctly, it's a syntax error. Your problem was you had the DMG file as the 'command'. 

If disk2 is your destination (the 4.2gb disk), then the following should work for you. 

First, make sure your command prompt has nothing typed by you in it, either press Ctrl-C or Return a couple times then:

sudo dd if=/Users/rabika_1/Desktop/USB\ disk\ 4\ gb.dmg of=/dev/rdisk2 bs=1m conv=sync


That will erase disk2 (rdisk2) and replace it with whatever "USB disk 4 gb.dmg" is.

You will need to enter your administrator or root password when it prompts you for it. You won't see any feedback until it's done, you'll be at another command prompt. 

After that you should be set. 

Now there is another way of doing this where you can see the progress, if you want, then use this command instead of the prior one:

sudo dd if=/Users/rabika_1/Desktop/USB\ disk\ 4\ gb.dmg of=/dev/rdisk2 bs=1m status=progress conv=sync