nother newb question filepath


Hi. sorry about the RTFM question in advance. I know the basic unix commands and about escaping spaces and such but I'm in no way experienced. I'm trying to put file paths into the rm and mv commands

I know people are sick of questions like this because I'm a forum expert somewhere else. but um I know theres something I havent read. what is it?

PS I need to give it some sort of absoulte path (its coming from max/msp shell object)

mv 'Macintosh HD:/Users/matt/Desktop/testfiles/forklift/forklift' 'Macintosh HD:/Users/matt/Desktop/testfiles/forklift/neff'
no such file or directory
mv Macintosh\ HD:/Users/matt/Desktop/testfiles/forklift/forklift Macintosh\ HD:/Users/matt/Desktop/testfiles/forklift/neff
no such file or directory
rm 'Macintosh HD:/Users/matt/Desktop/testfiles/forklift/forklift'
no such file or directory
rm Macintosh\ HD:/Users/matt/Desktop/testfiles/forklift/forklift
no such file or directory
rm ~/Users/matt/Desktop/testfiles/forklift/forklift
no such file or directory


U.S.D.A. Prime
First off, using a colon for a separator was dead with OS 9... OS X is pure UNIX, meaning it's all slashes now.

There is no "Users" folder in your home folder (~ == home folder). Saying ~/matt is like saying /Users/matt/matt.

If the file were on your Desktop, you could remove it like this:

rm ~/Desktop/somefile

If it were in your home folder, it would simply be:

rm ~/somefile

Or, for a full pathname, this is the exact same thing:

rm /Users/yourusername/somefile

I think what you want is:
rm ~/Desktop/testfiles/forklift/forklift
rm /Users/matt/Desktop/testfiles/forklift/forklift
...if the file is named "forklift" and is located inside of a folder called "forklift" that resides on matt's Desktop.


Scratch & Sniff Committee
Hey, here's a tip for you Puukey, if you're having trouble working out the unix filepath to a file. Open a terminal window, and drag that file onto the terminal window. It types the complete filepath in!
That way, if you intend to move something, you could for instance type mv (space) and then drag the source file onto the window. Try it out.


welcome to, There is no such thing as a stupid question. We all had to learn basic unix commands