- !/bin/bash
autosymlinks ()
{
dir_path=`mktemp -d ~/tmp/gxsearch.XXXXXXX`
find ~/ /home/pub/ /mnt/cdrom -iname "$1" -exec ln -s "{}" $dir_path \;
echo $dir_path
}
search_string=`zenity --title="Find files" --entry --text="Enter file name to fi
nd"` &&
{
temp_dir=`autosymlinks "$search_string"`
rox -n $temp_dir &&
rm -fvr $temp_dir
}
I would rather use locate than find, for speed. But, I don't know how.