Thursday, June 14, 2012

Linux VMware 8 swedish keyboard

After loads of problems with VMware 8.0.3 installation on Fedora 16(with patch vmware802fixlinux320.tar.gz 'changed the version number in the script' ) i noticed that all the keys did not work. Im using swe keys in Fedora 16.
After a bit of research and Keyboard mapping i managed to get it right.
edit following config file. save it( esc :wq) restart VMware and it hopefully will work for you to.

vi ~/.vmware/config


xkeymap.noKeycodeMap = "TRUE"
xkeymap.keycode.20 = 0x00c #SWE +?\
xkeymap.keycode.21 = 0x00d #SWE '`
xkeymap.keycode.61 = 0x035 #SWE -_
xkeymap.keycode.49 = 0x029 #SWE §½
xkeymap.keycode.34 = 0x01a #SWE Å
xkeymap.keycode.35 = 0x01b #SWE ~^"
xkeymap.keycode.47 = 0x027 #SWE ö
xkeymap.keycode.48 = 0x028 #SWE ä
xkeymap.keycode.51 = 0x02b #SWE '*

Tuesday, June 12, 2012

head / tail


head and tail command displays the upper and bottom of a file.
head -n 10 /var/log/messages #displays top 10 rows of messages
head -n 10 /var/log/messages /var/log/secure #displays the top 10 rows of messages and secure
tail -n 10 #displays the same thing as head but the bottom part of the filename

Less command


Less shows the content of a file. syntax is less filename.
You cant less output through a pipe but you can pipe to less.

SPACE = Move forward a page at a time
ESC then V = Move backward a page
UP and Down arrowkeys = Move up and down a line
/word = searches for word forwards
?word = searches for word backwards
g50 = jumps to row 50
q = exits Less program

Favorite Linux Sites

Im trying to google the things i want to know but sometimes its nice to have some sites to find inspiration on.
http://www.howtogeek.com/tag/linux/ - loads of guides
http://tldp.org/ - Loads of howto.

Moving within the line


One of my favourite shortcommands in windows is moving forward and backward one word. Its actually the same in Linux. CTRL + LEFT or Right arrow. When you have jumped to the right spot you sometimes want to alter the end of the command.

CTRL+X followed by backspace will delete evrything behind the marker.
CTRL+K will delete evrything befor the marker.
ESC+U will make evrything behind marker uppercase
ESC+L will make evrything behind marker Lowercase
ESC+C is upper or lowercase on the character

Thursday, June 7, 2012

The journey continues CTRL+R search history Linux

Now i have decided to learn more about linux. Starting off with some basic Terminal knowledge starting up with the Bash shell. Ive noticed when working with linux you often write the same thing over and over again. Examples are configuring apache or tomcat when you got to restart the service all the time. You start with wringing service apache restart. Then after a while you need to write it again. Instead of writing the whole command you just press CTRL+R and ser. If you don't get the right command just continue pressing the CTRL+R button until you get the right command. If you accidentally missed the command it is possible to search backwards by pressing CTRL+S When you get tired of looking and there are no commands that you need you can terminate the search by pressing CTRL+G.