# terminal "command not found"



## erezb1 (Feb 21, 2011)

Hello all.

A few weeks ago i wrote a code (found a tutorial on the web) in the terminal window for 3D Maya Batch rendering, and since then i can't empty the trash (the only terminal command i know) with: *sudo rm -rf ~/.Trash/**.

Please help me solve it.

Thanx
E.


----------



## DeltaMac (Feb 21, 2011)

Does your trash not empty normally?

You say that 
sudo rm -rf ~/.Trash/*
command does not work...
What does it do, then? Do you get an error?
That command should ask for your password. Does it?


----------



## erezb1 (Feb 21, 2011)

Trash can be empty regular, but it takes time, with this command i happened in 3 sec.
When writing *sudo rm -rf ~/.Trash/** i get *command not found*.


Thanx
E.


----------



## DeltaMac (Feb 21, 2011)

The command as you are showing it here, appears correct.
Lets make sure which part of that command is not found.
Type rm in the terminal (nothing else) and press enter. You should get a couple of lines showing the optional arguments for rm, like this:



> usage: rm [-f | -i] [-dPRrvW] file ...
> unlink file



If you still get "command not found", then you may not know what else is missing, and you should reinstall OS X.


----------



## erezb1 (Feb 21, 2011)

this is what i get

Last login: Mon Feb 21 22:28:04 on ttys000
Erez-ArtKit:~ erezberman$ rm
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
Erez-ArtKit:~ erezberman$ 




thanx


----------



## DeltaMac (Feb 21, 2011)

Try the command once more - without the sudo...
rm -rf ~/.Trash/*


----------



## erezb1 (Feb 21, 2011)

got a huge list of all files in the trash, on each one of them got *Permission denied*


----------



## DeltaMac (Feb 21, 2011)

Ah, no "command not found" this time!
Good - now try the command again, only with sudo, and see what happens this time.
I suspect you may have mistyped that command when you tried before, so type carefully.


----------



## erezb1 (Feb 21, 2011)

Again same problem, i always do  "copy paste" from at text file i have. no mistyping.
How can i check what i've changed before ?

Thanx
E


----------



## DeltaMac (Feb 22, 2011)

Maybe your "text file" is also mistyped. Has it ever worked for you?
Maybe you are picking up an extra space when you copy/paste.
Try typing it manually, it's short...
sudo(space)rm(space)-rf(space)~/.Trash/*


----------



## erezb1 (Feb 22, 2011)

it is not that, did it 1000 times before.
also pasted it from the text you wrote me.

Thanks


----------



## DeltaMac (Feb 22, 2011)

(hopefully, not the one with all the (space)s  )

As a next step, I would likely try downloading, and reinstalling your current OS X combined updater.


----------



## erezb1 (Feb 22, 2011)

Thanx deltaMec,


----------

