Monday, December 29, 2014

Make Ubuntu full screen in virtual box

My friend told me that he installed Ubuntu 14.04 32 bit on his Virtual box but the screen is too small
and he can't make it as full screen so I tried to solve this issue and here is the steps
1- Download  VBoxGuestAdditions ISO for the virtual box version which you have
   EX: if you have latest virtual box version 4.3.20 you have to download     :VBoxGuestAdditions_4.3.20.iso
2- Open your ubuntu virtual which already installed and run this command while you are connected to the internet

sudo apt-get install dkms

3-  Insert the iso VBoxGuestAdditions into the virtual machine using virtual box

4- Open terminal and go to the path of CD
  "cd  /media/{user name}/VBADDITIONS_{version number}"

5-Run this command
sudo sh ./VBoxLinuxAdditions.run
then restart the virtual machine and it will works fine full screen mode (HOST+F)
Source of commands

https://www.virtualbox.org/manual/ch04.html#additions-windows

Tuesday, October 18, 2011

Creation of jar file using command line (By Shymaa Tarek)




create a folder name this folder the same as the package name (in this example the package and folder are called mypkg).
put your file .class in this folder
first create file called manifest.txt  out side the new folder(mypkg) leave this file empty.
Write this command where it will create a jar file called ExecutableJar.jar

   jar cmf manifest.txt ExecutableJar.jar  mypkg

now the jar file is created if you run this jar file with this command
  java -jar ExecutableJar.jar

you will have this error message

"Failed to load Main-Class manifest attribute from ... .jar"

open the manifest file with the archive manager
  remove these two lines:

  Manifest-Version: 1.0
  Created-By: 1.6.0_20 (Sun Microsystems Inc.)
  
   add this line :

   Main-Class: PackageName.ClassName
   
 1. Make sure that you left white space after   :
  2.you have to press enter after finishing the line

Source:

Monday, December 6, 2010

Get directory size in linux

To get directory size use next command

$ du directory

there is option "-h" to be human readable

$ du -h directory

source : http://www.codecoffee.com/tipsforlinux/articles/22.html

Sunday, December 5, 2010

How to run script or any command and logout and script still runnig

Our problem today is:

you have a remote server linux and you need to run command to restore database or run script which will take about 1 hour or more. you need to close your session and command still running because if you logout your command will stop but we have a solution today

to run the script and still running  after logout by

nohup your_commadn &

don't forget  &   because it put your command in background

source : http://www.cyberciti.biz/tips/nohup-execute-commands-after-you-exit-from-a-shell-prompt.html

enjoy your time
  ;)

Friday, December 3, 2010

Idea and reason of this blog

Hi all,
    How are you ? I hope you fine.Well about this blog. There are many problem facing me every day in programming and linux and I search on the internet to find how to solve my problem.So I want to share my problems and solving of this problem here for me and for every one in the world. I hope to be useful for every one.


BYE

Show certian line in document using command

If you have a large document and you want to see  only one line in documet and you know the line number
you can use this command

sed -n "linenumber p" file.txt

source :
http://www.linuxquestions.org/questions/linux-newbie-8/display-line-number-n-from-a-file-273780/

thanks