Created
August 13, 2018 07:01
-
-
Save codethereforam/ac356e6cbc1dcfbf254ab91925ae1657 to your computer and use it in GitHub Desktop.
open a symbolic link's real path in nautilus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# open a symbolic link's real path in nautilus | |
# create an executable file in ~/.local/share/nautilus/scripts | |
# reference: https://askubuntu.com/questions/411430/open-the-parent-folder-of-a-symbolic-link-via-right-click | |
# reference: https://help.ubuntu.com/community/NautilusScriptsHowto | |
if [ -h $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ]; then | |
nautilus "$(readlink $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" | |
else | |
zenity --info --text="$(basename "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS") is not a symbolic link" | |
exit 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment