discover if icon is a symbolic link to a folder ( or to an
ordinary file).
He used it in Large file finder
http://murga-linux.com/puppy/viewtopic.php?t=77779
I used it in the script create-3mu found HERE
The 'find' command won't work if the location given
is a symbolic link. So getting the real location is important.
Code: Select all
FPATH="$1"
TEST=`stat -c %F "$FPATH"`
if [ "$TEST" = "symbolic link" ]; then
FPATH=`stat -c %N "$FPATH" | cut -f3 -d '\`'`
FPATH=${FPATH%?}
fi
After execution of the code it will be the path to the real folder(or file)
The variable TEST will contain the text "symbolic link" if
the user has right clicked on a symbolic link.
In the special case of the symbolic link and the real file being
in the same folder -----> just the real name is returned.
___________________________________________
__________________________________________________