restore=$(find my-documents/* | grep $1)
filename=$(readlink -f $restore)
mv -i "$filename" "$(grep $1 $HOME/TrashLog)"
But, in the future, you will have a lot of problems with this script. There are a lot of ways to break it in its current form.[/QUOTE]
I had a look at this, and tested it. I actually was returned with an error.
(There is a file in Trash currently called "Derp".)
I did.. restore derp. In the console. I was returned with..
"find: `my-document/*': No such file or directory
readlink: missing operand
Try 'readlink --help' for more information.
mv:cannot stat `/root/my-documents/mydir01/derp: no such file or directory
Super confused :/
Is this a permissions issue? or something not quite working with the original code which is causing issues later with my restore?
Thanks for your time.