Create Symbolic Link Ubuntu

Previously I get confused on how to create symbolic link for directory, I tried so many times, but it generate the wrong resul. I have directory : /usr/local/hive-0.11.0 , and I want to create symbolic link on /usr/local/hive, so whenever I open this folder : /usr/local/hive it will refer to  /usr/local/hive-0.11.0, and I also I can easily update the version of HIVE only by update the symlink,

First I tried this

$ ln -s /usr/local/hive-0.11.0 /usr/local/hive

however it give these following result  when i typed ls -l of /usr/local/hive

$ ls -l  /usr/local/hive
lrwxrwxrwx  1 root root         11 Nov 11 15:14 hive-0.11.0 -> hive-0.11.0

so I tried this

  • Go to /usr/local directory first

    $ cd /usr/local

  • Create hive folder inside /usr/local/

    $ mkdir hive

  • create symbolic link

    $ ln -s hive-0.11.0 hive

  • Result

    $ ls -l /usr/local
    lrwxrwxrwx 1 root root 11 Nov 11 15:14 hive -> hive-0.11.0
    drwxrwxrwx 10 tid tid 4096 Nov 11 15:07 hive-0.11.0

 

Difference between Ctrl-D, Ctrl-Z, Ctrl-C

Firstly, I wonder what is the difference among Ctrl-d, Ctrl-c, and Ctrl-z in linux terminal, Since I found that sometimes it affects the current process, and makes some programs run abnormally, when I am using different command, here I share the difference between those command :

  • Ctrl-D : Used to terminate input or exit the terminal or shell
  • Ctrl-C : Used to suspend foreground processes
  • Ctrl-Z : Used to kill foreground processes

So if we want to kill the process clearly, it’s better to use Ctr-c instead of Ctrl-z, since Ctrl-z only paused the process