Aylık arşivler: Mart 2015

Difference between java/javaw/javaws

  1. The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class’s main method.
    1. Display output/errors
  2. The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don’t want a command prompt window to appear.
    1. No display of output/errors. Can be used to silently push the output/errors to text files. Mostly used to launch GUI based applications.
  3. javaws: (java web start) to download and run the distributed web applications. again No console is associated.

All are part of JRE and use same JVM

Adding SSH Public Key to a user

If your SSH folder does not yet exist, create it manually:

mkdir /home/username/.ssh
chmod 0700 /home/username/.ssh
touch /home/username/.ssh/authorized_keys
chmod 0644 /home/username/.ssh/authorized_keys
sudo nano /home/username/.ssh/authorized_keys


cat /home/username/.ssh/authorized_keys << ..............one line public key copy..............

Common Ubuntu Commands


zip -r <oluşturulacak zip dosyası yolu> <sıkıştırılacak klasör yolu>
Ör: zip -r ./yedek/2015-02-17.zip ./production/site1

unzip file.zip -d destination_folder



sudo useradd -m username
(-m creates home directory /home/username)


sudo usermod -G name-of-group -a name-of-user


If a user has sudo command permission,
sudo -s
after this command user doesn’t need to enter sudo command before root commands

Git Tips

Config: Basic / Default

git config --global user.name "Your Name"
git config --global user.email "Your Email"
git config --global color.ui true
git config --global apply.whitespace nowarn

Github: Repo oluşturmak

  • Önce github‘da repo oluştur
  • Daha sonra ilgili git url’ini al. git@github.com:vigo/Sample_Project.git
mkdir my_local_branch
cd my_local_branch/
git init
touch readme.md
git add readme.md
git commit -m "init"
git remote add origin git@github.com:vigo/Sample_Project.git
git push origin master

Eğer daha önceden local’de bulunan bir repoyu daha sonra github‘a taşımak istersen:

cd existing_git_repo/
git remote add origin git@github.com:vigo/Sample_Project.git
git push origin master


git remote -v                 # fetch ve push url'lerini gör
git remote show origin        # detaylı bilgi al

Track Edilmeyen Dosyaları Silme

git clean  -d  -fx ""