![]() It doesn't have to be deleted precisely after 48 hrs. Instead I'll rather delete the partition every now and then with secure pass using diskutility. The shell script works great! Thanks a lot for your quick reply! I guess I'll do it with -s instead of -m since the dmg measures about 1.5gig and that takes ages to be overwritten. Mr_Noodle Site Admin Posts: 10648 Joined: Sun 1:30 am Location: New York Cityīingo. That said, if you could mount the backup server as a network share and don't mind moving the old one to the trash, you could do a move to the share with the overwrite option set. The old file goes to the trash, though, plus it's a local move, not one to a server. That said, Hazel's built-in move action will allow you to overwrite an existing file. I don't know if you require absolute precision on this or not. It won't necessarily be exactly 48 hours but pretty close (like within minutes, usually). If you do 'man srm' on the commandline, you can get a full description of the options. 'r' is recursive (in case you are deleting a folder, for instance) and 'm' is for "medium" which is does a 7 pass overwrite on the file. The script would look something like: Code: Select all srm -frm $1 The 'f' option is to "force" the removal. To do a secure delete, you need to use the 'srm' command. Thanks Jo* Jo* Posts: 7 Joined: Fri 3:41 pm Since the creation of the dmg by DropDMG as well as the transfer of the dmg are part of an overnight process, I assume Hazel would delete the file exactly 48 hrs later, right? (as the rule says "Date Created - is not in the last - 2 - Days"). I'm very much of a scripting amateur, so explanation catered to the dummy would be very much appreciated (like what has to be in the upper part of the Edit Script window of Hazel, and what should be stated in the lower window). ![]() Keep in mind, the file to be deleted is on an external drive. Any idea of how the shell script should look like. I would like to securely delete the dmg not taking a detour over the regular trashcan but rather securely delete it right away. The Hazel rule I set up is as follows: If all of the following conditions are met Full Name - is - file.dmg Date Created - is not in the last - 2 - Days Do the following Run shell script - embedded script Shell: ? Send Growl notification - with pattern. HD - the online backup is meant for total desaster like theft or the like. I also backup a complete bootable clone of the int. Since the dmg is only used for this sole purpose, I would like to securely delete it using the equivalent of the Finders "securely delete trash". ![]() So in order to keep the whole procedure automatic, I would like to erase the dmg after it has been sent to the server so DropDMG will create a dmg with the same name the next time - thus allowing for an automatic transfer of the file to the online backup-server (as setup in a script). However, DropDMG does not overwrite an exisiting dmg with the same name that is still in place on the ext. Both the creation of the dmg and the backing-up to the online backup-server are automated. I use DropDMG to create a compressed, encrypred dmg that is being backed up to an online backup-server once or twice a week. Hi there, I'd like to set up a rule in Hazel that will securely delete a dmg on an external harddrive. ![]()
0 Comments
Leave a Reply. |