I executed ls *tags* -ls when my current directory is /usr/bin and the result is:
0 lrwxrwxrwx 1 root root 23 Apr 8 2024 ctags -> /etc/alternatives/ctags
304 -rwxr-xr-x 1 root root 309024 Apr 8 2024 ctags-exuberant
0 lrwxrwxrwx 1 root root 23 Apr 8 2024 etags -> /etc/alternatives/etags
4 -rwxr-xr-x 1 root root 2514 Aug 27 2024 helpztags
and the result of ls *tags* -ls when I am in /etc/alternatives/ directory is:
0 lrwxrwxrwx 1 root root 24 Apr 8 2024 ctags -> /usr/bin/ctags-exuberant
0 lrwxrwxrwx 1 root root 40 Apr 8 2024 ctags.1.gz -> /usr/share/man/man1/ctags-exuberant.1.gz
0 lrwxrwxrwx 1 root root 24 Apr 8 2024 etags -> /usr/bin/ctags-exuberant
0 lrwxrwxrwx 1 root root 40 Apr 8 2024 etags.1.gz -> /usr/share/man/man1/ctags-exuberant.1.gz
So, it seems both etags and ctags refer to the same binary (/usr/bin/ctags-exuberant)
My question is, when I execute ctags the output file name is tags, but when I execute etags output file name is TAGS (without -o option for both cases). How it is defined?