I'm new to Linux and I've written a script to move files to a specified folder (fake delete).
However it will only
mv the file in the same folder as my script. Is there a way I can make this executable to delete any file no matter the location?
DELETE test ..(test is in ~/my-documents folder) (delete script in ~/my-applications/bin folder)
The script is below.
echo do you want to delete this? (yes/no) \n read ans \n case "$ans" in Y¦y¦yes ) echo "$readlink -f "$1")" >>"$HOME/DustbinLog" && mv "$1" "$HOME/my-applications/bin/dustbin";; N¦n¦no echo "File not moved!";; esac