Let me give an example (it's just an example taken from here):
$ ls -l /usr/bin/gnome-text-editor lrwxrwxrwx 1 root root 35 Mar 16 2015 /usr/bin/gnome-text-editor -> /etc/alternatives/gnome-text-editor $ ls -l /etc/alternatives/gnome-text-editor lrwxrwxrwx 1 root root 14 Mar 16 2015 /etc/alternatives/gnome-text-editor -> /usr/bin/gedit $ ls -l /usr/bin/gedit -rwxr-xr-x 1 root root 588064 Mar 27 2014 /usr/bin/gedit Here you can see that I've to use ls -l three times for reaching to destination. (3rd time is for making sure that /usr/bin/gedit is not a link`)
Is there any way (by means of making script or another command etc.) that I can get expected output like:
$ <improved ls -l> /usr/bin/gnome-text-editor lrwxrwxrwx 1 root root 35 Mar 16 2015 /usr/bin/gnome-text-editor -> /etc/alternatives/gnome-text-editor lrwxrwxrwx 1 root root 14 Mar 16 2015 /etc/alternatives/gnome-text-editor -> /usr/bin/gedit Another good output may be:
$ <some-command> /usr/bin/gnome-text-editor /usr/bin/gnome-text-editor > /etc/alternatives/gnome-text-editor > /usr/bin/gedit