Question: I'm trying to write an applescript to delete my sleepimage file. The terminal command to do 

```
sudo rm /private/var/vm/sleepimage

```

Clearly I cannot just type that into the applescript editor, so I've been using this

```
do shell script rm / private / var / vm / sleepimage with administrator privileges

```

But with that I get this error 

> 
> error "The variable rm is not defined." number -2753 from "rm"
> 
> 
> 

Any help would be appreciated, I know its simple, but I'm not too good with this code stuff.

Thank you!

Answer: 
I suspect you just need some quotes in your miniature Applescript there.

try:

```
do shell script "rm /private/var/vm/sleepimage" with administrator privileges

```

I'll be amazed if this is what you end up using in the end though, because it's going to require you (or somebody) to type in the admin username & password each time that script is called.
The more sensible solution is to do:

```
sudo pmset hibernatefile /dev/null

```

Then once you delete the hibernate file once, it is deleted for good.