Create file when script has executed

I would like to get some kind of notification when a script has been executed.

I know how to get an email sent, but I something different.

This works, unless it occurs when I am not at my computer.

notify-send "Cleanup of Backup Directories complete."   

It could even involve creating a file in a directory.

I would need to create said file from within my backup script.

Update:

This works,

zip -u -q test.zip *.txt *.doc *.rtf *.html *.png *.pdf *.odt *.ods *.odg 
cp "Ubuntu_Documents.zip" /home/andy/Downloads > filebackup.txt

but I get

cp: cannot stat 'Ubuntu_Documents.zip': No such file or directory

Note that this could be a problematic proposition because once the script has been run the file is there. How do you set apart the file that has already been there from the first run from the file to be created by the second run, hmm?

This is most probably because zip doesn't write to a file named Ubuntu_Documents.zip". Perhaps your zip-file has some other name (i suppose, from the commandline, "test.zip") and you would have to reflect this name in the cp -command.

Furthermore, are you sure you want to name the file "whatever.txt"?? A file ending in .txt is supposed to be plainly readable text and .zip-files aren't exactly that.

I hope this helps.

bakunin

You are right.

I went with

touch /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/$( date '+%Y-%m-%d_%H:%M' )

I have another script that deletes the older files.